Allocate memory.
This is called by COS to allocate memory to store necessary state information. The simplest implementation is to use the default platform's standard malloc call, ignoring the hint.
This callback must not be NULL.
- Parameters
-
size | The size of the storage required. |
hint | A hint to indicate the type of memory that is being requested. See DOSMemoryHint. |
- Returns
- A pointer to usable memory. The Free callback will be called with this pointer later to free the memory.
- Exceptions
-
NULL | is returned to indicate there is currently no memory available for the request. |