API for doing dynamic memory allocation.
This provides malloc()/free() functionality with locking. The shared resource heap needs to be protected from concurrent access when OS has been started. os_malloc() function grabs a mutex before calling malloc().
N/A
The functions available in heap are:
Function | Description |
---|---|
os_free | Frees previously allocated memory back to the heap. |
os_malloc | Allocates the given number of bytes from heap and returns a pointer to it. |
os_realloc | Tries to resize previously allocated memory block, and returns pointer to resized memory. |