=============== UI_Alloc =============== */
| 1419 | =============== |
| 1420 | */ |
| 1421 | void *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 | =============== |
no test coverage detected