From liblfds.org
Jump to navigation Jump to search

Source Files



void *lfds611_abstraction_malloc( size_t size );


size_t size

Number of bytes to allocate.

Return Value

Pointer to the allocated memory, NULL if allocation fails.


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.


The implementation of lfds611_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 *lfds611_abstraction_malloc( size_t size )
     return( malloc(size) );

See Also