Go to the first, previous, next, last section, table of contents.


memalign

Syntax

#include <stdlib.h>

void *memalign(size_t size, size_t alignment);

Description

This function is like malloc (see section malloc) except the returned pointer is a multiple of alignment. alignment must be a power of 2.

Return Value

A pointer to a newly allocated block of memory.

Portability

not ANSI, not POSIX

Example

char *page = memalign(1024, 1024 * 4);


Go to the first, previous, next, last section, table of contents.