|
muteki
|
Heap memory management function hooks. More...
#include <muteki/common.h>Go to the source code of this file.
Functions | |
| void * | osdep_heap_alloc (size_t size) |
| Allocate and format mchx memchunk. | |
| size_t | osdep_heap_get_alloc_size (const void *ptr) |
| Get usable size of an allocated mchx memchunk. | |
| void | osdep_heap_free (void *ptr) |
| Free a mchx memchunk. | |
| bool | osdep_heap_trace_start (void) |
| Start the heap tracer. | |
| bool | osdep_heap_trace_stop (void) |
| Stop the heap tracer. | |
Heap memory management function hooks.
The default allocator Besta RTOS provides aligns the memory it allocates to 4-bytes boundary, however the AAPCS requires memory to be aligned to 8-bytes boundary. This header file provides hooked version of allocator functions like malloc and free, which align the memory to 8-bytes boundary by inserting spaces conditionally, and also optionally traces the allocation done by the hooked functions.
|
extern |
Allocate and format mchx memchunk.
| size | Size of the memory to allocate. |
|
extern |
Free a mchx memchunk.
| ptr | Pointer to previously allocated memory. |
| size_t osdep_heap_get_alloc_size | ( | const void * | ptr | ) |
Get usable size of an allocated mchx memchunk.
| ptr | Memory allocated by osdep_heap_alloc(). |
|
extern |
Start the heap tracer.
| true | The operation was completed successfully. |
| false | The operation was completed successfully. |
|
extern |
Stop the heap tracer.
| true | The operation was completed successfully. |
| false | The operation was completed successfully. |