MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Cvar_Realloc

Function Cvar_Realloc

code/qcommon/cvar.cpp:1393–1403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1391
1392
1393static void Cvar_Realloc(char **string, char *memPool, int &memPoolUsed)
1394{
1395 if(string && *string)
1396 {
1397 char *temp = memPool + memPoolUsed;
1398 strcpy(temp, *string);
1399 memPoolUsed += strlen(*string) + 1;
1400 Cvar_FreeString(*string);
1401 *string = temp;
1402 }
1403}
1404
1405
1406//Turns many small allocation blocks into one big one.

Callers 1

Cvar_DefragFunction · 0.70

Calls 1

Cvar_FreeStringFunction · 0.70

Tested by

no test coverage detected