PVOID stMemAlloc( SIZE Size );
Size of the memory block to allocate.
Pointer to the newly allocated memory block or NULL on failure.
This function allocates a memory block of a specified size. If the function succeeds, it returns a pointer to the newly allocated memory block. On failure, it returns NULL. To retrieve extended information about a failure, use the stGetLastError function. Allocated memory areas can be released using the stMemFree function.
If the memory management functions for the alternative C library are inactive (the
ST_USE_MALLOC_CLIB constant is set to 1), the stMemAlloc function will allocate
memory using the malloc function from the standard C library.
If the memory management functions for the alternative C library are active, the function will allocate memory using stMemoryAlloc within the memory pool defined in the stMemoryPool variable. Please refer to its description for further information.
| Version: | 1.0 |
|---|---|
| Header file: | ST_CLIB.h (include ST_API.h) |
| See also: | memory management, NULL, PVOID, SIZE, ST_USE_MALLOC_CLIB, stGetLastError, stMemoryPool, stMemFree, stMemoryAlloc |