engine: server: adjust 64-bit string pool size depending on max_edicts value (65k for each 1024 edicts)
This commit is contained in:
parent
a6592e7776
commit
723cd8e26c
1 changed files with 3 additions and 3 deletions
|
@ -3069,13 +3069,13 @@ static void SV_AllocStringPool( void )
|
||||||
string lenstr;
|
string lenstr;
|
||||||
|
|
||||||
Con_Reportf( "%s()\n", __func__ );
|
Con_Reportf( "%s()\n", __func__ );
|
||||||
if( Sys_GetParmFromCmdLine( "-str64alloc", lenstr ) )
|
if( Sys_GetParmFromCmdLine( "-str64alloc", lenstr ))
|
||||||
{
|
{
|
||||||
str64.maxstringarray = Q_atoi( lenstr );
|
str64.maxstringarray = Q_atoi( lenstr );
|
||||||
if( str64.maxstringarray < 1024 || str64.maxstringarray >= INT_MAX )
|
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" ) )
|
if( Sys_CheckParm( "-str64dup" ) )
|
||||||
str64.allowdup = true;
|
str64.allowdup = true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue