2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

engine: server: adjust 64-bit string pool size depending on max_edicts value (65k for each 1024 edicts)

This commit is contained in:
Alibek Omarov 2024-11-13 23:30:50 +03:00
parent a6592e7776
commit 723cd8e26c

View File

@ -3069,13 +3069,13 @@ static void SV_AllocStringPool( void )
string lenstr;
Con_Reportf( "%s()\n", __func__ );
if( Sys_GetParmFromCmdLine( "-str64alloc", lenstr ) )
if( Sys_GetParmFromCmdLine( "-str64alloc", lenstr ))
{
str64.maxstringarray = Q_atoi( lenstr );
if( str64.maxstringarray < 1024 || str64.maxstringarray >= INT_MAX )
str64.maxstringarray = 65536;
str64.maxstringarray = 65536 * Q_ceil( GI->max_edicts / 1024.0f );
}
else str64.maxstringarray = 65536;
else str64.maxstringarray = 65536 * Q_ceil( GI->max_edicts / 1024.0f );
if( Sys_CheckParm( "-str64dup" ) )
str64.allowdup = true;