delorie.com/djgpp/doc/libc/libc_562.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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

ANSI/ISO C No
POSIX No

Example

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

  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004