MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                   posixmemalign(3C)



NAME
     posixmemalign - aligned memory allocation

SYNOPSIS
     #include 

     int posixmemalign(void **memptr, sizet alignment, sizet size);


DESCRIPTION
     The posixmemalign() 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 previ-
     ously been allocated by posixmemalign().

RETURN VALUES
     Upon successful completion, posixmemalign()  returns  zero.
     Otherwise,  an  error  number  is  returned  to indicate the
     error.

ERORS
     The posixmemalign() 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.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:









SunOS 5.11          Last change: 14 Jul 2008                    1






Standard C Library Functions                   posixmemalign(3C)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     MT-Safe                     
    
     Standard                     See standards(5).           
    


SEE ALSO
     free(3C),  malloc(3C),  memalign(3C),  attributes(5),  stan-
     dards(5)









































SunOS 5.11          Last change: 14 Jul 2008                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™