engine: server: always allocate svgame.stringspool, it's used to track temp string allocations like in SV_CopyString
Potentially fixes memory leakage on 64-bit when game uses instanced baselines or consistency lists
This commit is contained in:
parent
a749bb8ef1
commit
88c42d50f2
2 changed files with 3 additions and 3 deletions
|
@ -3029,8 +3029,6 @@ void SV_EmptyStringPool( qboolean clear_stats )
|
||||||
str64.numdups = 0;
|
str64.numdups = 0;
|
||||||
str64.numoverflows = 0;
|
str64.numoverflows = 0;
|
||||||
}
|
}
|
||||||
#else // !XASH_64BIT
|
|
||||||
Mem_EmptyPool( svgame.stringspool );
|
|
||||||
#endif // !XASH_64BIT
|
#endif // !XASH_64BIT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3153,9 +3151,10 @@ static void SV_AllocStringPool( void )
|
||||||
str64.plast = (byte*)ptr + 1;
|
str64.plast = (byte*)ptr + 1;
|
||||||
svgame.globals->pStringBase = ptr;
|
svgame.globals->pStringBase = ptr;
|
||||||
#else // !XASH_64BIT
|
#else // !XASH_64BIT
|
||||||
svgame.stringspool = Mem_AllocPool( "Server Strings" );
|
|
||||||
svgame.globals->pStringBase = "";
|
svgame.globals->pStringBase = "";
|
||||||
#endif // !XASH_64BIT
|
#endif // !XASH_64BIT
|
||||||
|
|
||||||
|
svgame.stringspool = Mem_AllocPool( "Server Strings" );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SV_FreeStringPool( void )
|
static void SV_FreeStringPool( void )
|
||||||
|
|
|
@ -716,6 +716,7 @@ void SV_DeactivateServer( void )
|
||||||
PM_ClearPhysEnts( svgame.pmove );
|
PM_ClearPhysEnts( svgame.pmove );
|
||||||
|
|
||||||
SV_EmptyStringPool( true );
|
SV_EmptyStringPool( true );
|
||||||
|
Mem_EmptyPool( svgame.stringspool );
|
||||||
|
|
||||||
for( i = 0; i < svs.maxclients; i++ )
|
for( i = 0; i < svs.maxclients; i++ )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue