1 typedef unsigned long int size_t;
4 * The alloc_align attribute is used to tell the compiler that the return
5 * value points to memory, where the returned pointer minimum alignment is given
6 * by one of the functions parameters. GCC uses this information to improve
7 * pointer alignment analysis.
9 * The function parameter denoting the allocated alignment is specified by one
10 * integer argument, whose number is the argument of the attribute. Argument
11 * numbering starts at one.
15 * void* my_memalign(size_t, size_t) __attribute__((alloc_align(1)))
17 * declares that my_memalign returns memory with minimum alignment given by
21 #define __alloc_align(x) __attribute__((__alloc_align__(x)))
24 * The aligned_alloc function allocates space for an object whose alignment is
25 * specified by alignment, whose size is specified by size, and whose value is
26 * indeterminate. The value of alignment shall be a valid alignment supported
27 * by the implementation and the value of size shall be an integral multiple
30 * The aligned_alloc function returns either a null pointer or a pointer to the
33 void *aligned_alloc(size_t alignment
, size_t size
) __alloc_align(1);
37 * check-name: attribute __alloc_align__