Query: posix_memalign
OS: opensolaris
Section: 3c
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
posix_memalign(3C) Standard C Library Functions posix_memalign(3C)NAMEposix_memalign - aligned memory allocationSYNOPSIS#include <sys/mman.h> int posix_memalign(void **memptr, size_t alignment, size_t size);DESCRIPTIONThe posix_memalign() function allocates size bytes aligned on a boundary specified by alignment, and returns a pointer to the allocated memory in memptr. The value of alignment must be a power of two multiple of sizeof(void *). Upon successful completion, the value pointed to by memptr will be a multiple of alignment. If the size of the space requested is 0, the value returned in memptr will be a null pointer. The free(3C) function will deallocate memory that has previously been allocated by posix_memalign().RETURN VALUESUpon successful completion, posix_memalign() returns zero. Otherwise, an error number is returned to indicate the error.ERRORSThe posix_memalign() function will fail if: EINVAL The value of the alignment parameter is not a power of two multiple of sizeof(void *). ENOMEM There is insufficient memory available with the requested alignment.ATTRIBUTESSee attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ |Standard |See standards(5). | +-----------------------------+-----------------------------+SEE ALSOfree(3C), malloc(3C), memalign(3C), attributes(5), standards(5) SunOS 5.11 14 Jul 2008 posix_memalign(3C)
Related Man Pages |
---|
aligned_alloc(3) - linux |
memalign(3) - redhat |
posix_memalign(3) - suse |
posix_memalign(3p) - posix |
posix_memalign(3) - v7 |
Similar Topics in the Unix Linux Community |
---|
Writing files using O_DIRECT in C |
Scanning alignment and "extracting" blocks |