The CMM examples share functions to call the sw_memory_api callback API provided by the RIP for allocation and deallocation. More...
Files | |
| file | cmm_common.c |
| Code common to all CMM examples. | |
| file | cmm_common.h |
| Header for code common to all CMM examples. | |
Functions | |
| void * | cmmegMemAlloc (sw_memory_instance *instance, size_t size) |
| Allocate CMM memory. More... | |
| void | cmmegMemFree (sw_memory_instance *instance, void *memory) |
| Release CMM memory. More... | |
The CMM examples share functions to call the sw_memory_api callback API provided by the RIP for allocation and deallocation.
| void* cmmegMemAlloc | ( | sw_memory_instance * | instance, |
| size_t | size | ||
| ) |
Allocate CMM memory.
An trampoline to sw_memory_api::alloc(). This function calls the sw_memory_api passed to the CMM API functions to allocate memory from the RIP.
| [in] | instance | A sw_memory_instance pointer provided to by the RIP. |
| [in] | size | The size, in bytes, of the memory allocation request. |
NULL if the allocation failed. | void cmmegMemFree | ( | sw_memory_instance * | instance, |
| void * | memory | ||
| ) |
Release CMM memory.
An trampoline to sw_memory_api::free(). This function calls the sw_memory_api passed to the CMM API functions to free memory to the RIP.
| [in] | instance | A sw_memory_instance pointer provided by the RIP. |
| [in] | memory | A pointer previously allocated by the alloc() method, which has not yet been freed. It is acceptable to pass NULL as the memory parameter, it will be ignored. |