r6.1.0:lfds610_abstraction_malloc
Jump to navigation
Jump to search
Source Files
/liblfds610/src/lfds610_abstraction/lfds610_abstraction_malloc.c /liblfds610/inc/liblfds610.h
Prototype
void *lfds610_abstraction_malloc( size_t size );
Parameters
size_t size
- Number of bytes to allocate.
Return Value
Pointer to the allocated memory, NULL if allocation fails.
Notes
The liblfds internally wraps this function in an aligned allocator to provide aligned allocation, which is required for atomic operations. Zero length allocations are never requested, so the question in that case of returning NULL or not is irrelevant.
Examples
The implementation of lfds610_abstraction_malloc on every platform except Windows kernel looks like this;
#if (!defined WIN_KERNEL_BUILD) /* TRD : any OS except Windows kernel on any CPU with any compiler !WIN_KERNEL_BUILD indicates not Windows kernel */ void *lfds610_abstraction_malloc( size_t size ) { return( malloc(size) ); } #endif