posix_memalign man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

POSIX_MEMALIGN(3C)					    POSIX_MEMALIGN(3C)

NAME
       posix_memalign - aligned memory allocation

SYNOPSIS
       #include <sys/mman.h>

       int posix_memalign(void **memptr, size_t alignment, size_t size);

DESCRIPTION
       The  posix_memalign() function allocates size bytes aligned on a bound‐
       ary specified by alignment, and returns a pointer to the allocated mem‐
       ory  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 VALUES
       Upon  successful	 completion, posix_memalign() returns zero. Otherwise,
       an error number is returned to indicate the error.

ERRORS
       The 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.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬───────────────────┐
       │  ATTRIBUTE TYPE    │  ATTRIBUTE VALUE	│
       ├────────────────────┼───────────────────┤
       │Interface Stability │ Committed		│
       ├────────────────────┼───────────────────┤
       │MT-Level	    │ MT-Safe		│
       ├────────────────────┼───────────────────┤
       │Standard	    │ See standards(5). │
       └────────────────────┴───────────────────┘

SEE ALSO
       free(3C), malloc(3C), memalign(3C), attributes(5), standards(5)

				 Jul 14, 2008		    POSIX_MEMALIGN(3C)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net