aligned_alloc(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

aligned_alloc(3c)

Standard C Library Functions                                 aligned_alloc(3C)



NAME
       aligned_alloc - aligned memory allocation

SYNOPSIS
       #include <stdlib.h>


       void *aligned_alloc(size_t alignment, size_t size);

DESCRIPTION
       The aligned_alloc() function allocates size bytes on a specified align‐
       ment boundary and returns a pointer to the allocated block.


       The alignment argument must be a valid alignment, that is, any power of
       two  (1, 2, 4, 8, ...) and the size argument must be an integral multi‐
       ple of alignment.


       The free(3C) function will deallocate memory that has  previously  been
       allocated by aligned_alloc().

RETURN VALUES
       Upon  successful  completion,  aligned_alloc() returns a pointer to the
       allocated space. Otherwise, aligned_alloc() returns a null pointer  and
       sets errno to indicate the error.

ERRORS
       The aligned_alloc() function will fail if:


       EINVAL    The  value of alignment is not a power of two, or size is not
                 a non-zero integral multiple of alignment.


       ENOMEM    There is insufficient memory  available  with  the  requested
                 alignment.



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


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe


NOTES
       The  aligned_alloc()  function  is  specified  in  the   C11   standard
       (INCITS/ISO/IEC 9899:2011).

SEE ALSO
       free(3C), malloc(3C), memalign(3C), posix_memalign(3C), attributes(7)



Oracle Solaris 11.4               11 Jun 2018                aligned_alloc(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3