SOM Kernel Reference 1-47
SOMMalloc Function
Purpose
Allocates the specified amount of memory.
Syntax
somToken (*SOMMalloc) (size_t size);
Description
The SOMMalloc function allocates size bytes of memory. The SOMMalloc function has the
same interface as the C malloc function. It performs the same basic function as malloc with
some supplemental error checking. If an error occurs, the SOMError function is called. This
routine is replaceable by changing the value of the global variable SOMMalloc.
Parameters
size The amount of memory to be allocated, in bytes.
Return Value
A pointer to the first byte of the allocated space.
Example
See the SOMFree function.
Related Information
Functions: SOMCalloc, SOMRealloc, SOMFree
Comentários a estes Manuais