Main Page | Data Structures | File List | Data Fields | Globals

memalign/memalign.h File Reference

Auxiliary function to allocate aligned blocks of memory. More...

#include <stdlib.h>

Data Structures

struct  mblock

Functions

mblockmemalign (size_t boundary, size_t size)


Detailed Description

Auxiliary function to allocate aligned blocks of memory.


Function Documentation

mblock* memalign size_t  boundary,
size_t  size
 

Allocate a block of memory with the malloc function and returns a mblock.

The mblock::addr field of the mblock returned is the address of a buffer aligned to a multiple of boundary.

The length of the aligned buffer is size.

To deallocate a mblock and the corresponding buffer, you must use the free function on the mblock.

Parameters:
boundary  power of two that specifies the alignment of the buffer
size  size of the allocated buffer


Generated on Wed Jan 10 03:11:03 2007 for The Removers Libraries by  doxygen 1.4.4