![]() |
dsekai
World engine for retrocomputers.
|
Functions and prototypes for managing memory. More...

Go to the source code of this file.
Data Structures | |
| struct | FAKE_MEMORY_HANDLE |
| An emulated memory handle for modern systems. Overridden on most platforms. More... | |
Functions | |
| int32_t | memory_init () |
| MEMORY_HANDLE | memory_alloc (uint32_t sz, uint32_t count) |
| Request dynamic memory from operating system while protecting from overflow conditions. | |
| void | memory_free (MEMORY_HANDLE handle) |
| Free a block of dynamic memory previously allocated with memory_alloc(). | |
| uint32_t | memory_sz (MEMORY_HANDLE) |
| uint32_t | memory_resize (MEMORY_HANDLE *, uint32_t) |
| void | memory_copy_ptr (MEMORY_PTR, CONST_MEMORY_PTR, uint32_t) |
| void | memory_zero_ptr (MEMORY_PTR ptr, uint32_t sz) |
| Fill a block of memory with zeros. | |
| WARN_UNUSED MEMORY_PTR | memory_unlock (MEMORY_HANDLE handle) |
| Unlock a dynamic memory handle so the system can relocate it on the heap to relieve congestion. | |
| char * | memory_strncpy_ptr (char *, const char *, uint16_t) |
| int16_t | memory_strncmp_ptr (const char *, const char *, uint16_t) |
| int16_t | memory_strnlen_ptr (const char *s, uint16_t l) |
| Get the size of a string, up to a specified maximum. | |
| void | memory_debug_dump () |
| WARN_UNUSED MEMORY_PTR | memory_lock (MEMORY_HANDLE handle) |
| Lock a dynamic memory handle and return a MEMORY_PTR that can be dereferenced safely. | |
Functions and prototypes for managing memory.