![]() |
LibGame v0.4.0
The LG Game Engine - Copyright (C) 2024-2026 ETMSoftware
|
Functions | |
| void * | malloc2_plus (size_t size, const char *file, unsigned int line, const char *func) |
| void | free2_plus (void *mem, const char *file, unsigned int line, const char *func) |
| void | free_v2 (void **mem) |
MEMORY MANAGEMENT malloc2/3() errors should end the program whereas free2/3() errors should not Plus, need to refactor all this -> confusing and too many different funcs
| void * malloc2_plus | ( | size_t | size, |
| const char * | file, | ||
| unsigned int | line, | ||
| const char * | func | ||
| ) |
This is experimental - invoked by malloc3() macro
Test with malloc3((size_t)1024 * (size_t)(1024 * 1024 * 1024)), ie requiring 1 TiB of mem
| void free2_plus | ( | void * | mem, |
| const char * | file, | ||
| unsigned int | line, | ||
| const char * | func | ||
| ) |
This is experimental - invoked by free3() macro
| void free_v2 | ( | void ** | mem | ) |
NEW - needs testing
free() v2
Take pointer to pointer to mem arg, so that it can be nullified afterwards
| nmem | Pointer to pointer to mem block |