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

Function UI_Alloc

code/ui/ui_shared.cpp:1421–1440  ·  view source on GitHub ↗

=============== UI_Alloc =============== */

Source from the content-addressed store, hash-verified

1419===============
1420*/
1421void *UI_Alloc( int size )
1422{
1423 char *p;
1424
1425 if ( allocPoint + size > MEM_POOL_SIZE )
1426 {
1427 outOfMemory = qtrue;
1428 if (DC->Print)
1429 {
1430 DC->Print("UI_Alloc: Failure. Out of memory!\n");
1431 }
1432 return NULL;
1433 }
1434
1435 p = &memoryPool[allocPoint];
1436
1437 allocPoint += ( size + 15 ) & ~15;
1438
1439 return p;
1440}
1441
1442/*
1443===============

Callers 3

MenuParse_itemDefFunction · 0.70
String_AllocFunction · 0.70
Item_ValidateTypeDataFunction · 0.70

Calls 1

PrintMethod · 0.45

Tested by

no test coverage detected