|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
MCTP memory management functions. More...
Go to the source code of this file.
Functions | |
| void * | mctp_heap_alloc (size_t bytes) |
| Allocate memory from the MCTP heap. | |
| void | mctp_heap_free (void *ptr) |
| Free memory allocated from the MCTP heap. | |
MCTP memory management functions.
| void * mctp_heap_alloc | ( | size_t | bytes | ) |
Allocate memory from the MCTP heap.
This function allocates memory from the MCTP heap. The memory returned is suitable to be sent to libmctp function that take ownership of the memory. The allocated memory should be freed using mctp_heap_free() when it is no longer needed.
| bytes | Number of bytes to allocate. |
| void mctp_heap_free | ( | void * | ptr | ) |
Free memory allocated from the MCTP heap.
This function frees memory that was previously allocated from the MCTP heap using mctp_heap_alloc(). The pointer passed to this function must have been returned by mctp_heap_alloc() and must not have been freed already.
| ptr | Pointer to the memory to free. |