SYS/SYS_Align.h File Reference

#include "SYS_API.h"
#include <stdlib.h>

Go to the source code of this file.

Defines

#define SYS_ALIGN16
#define SYS_ALIGN(b)

Functions

void * SYSamalloc (size_t b)
void * SYSacalloc (size_t n, size_t b)
void * SYSarealloc (void *p, size_t b)
void SYSafree (void *p)
void * SYSamalloc (size_t b, size_t)
void * SYSarealloc (void *p, size_t b, size_t)


Define Documentation

#define SYS_ALIGN ( b   ) 

Definition at line 113 of file SYS_Align.h.

#define SYS_ALIGN16

These definitions are system specific methods of forcing data to be aligned. Some processors require data to be aligned on 16 byte boundaries for certain operations. These macros and inline functions provide a consistent approach to doing this.

Example 1: class Foo { SYS_ALIGN16 int a[4]; int b; SYS_ALIGN16 char c; }; In the struct, both the A and C members will be aligned on a 16 byte boundary. This will force the size of the class to be 48 bytes.

Example 2: fpreal32 *list = SYSamalloc(4*sizeof(fpreal32)); This will guarantee that the list pointer is aligned on a 16 byte boundary.

Example 3: fpreal32 *list = SYSamalloc(4*sizeof(fpreal32), 128); This will guarantee that the list is aligned to a 128 byte boundary.

Definition at line 112 of file SYS_Align.h.


Function Documentation

void* SYSacalloc ( size_t  n,
size_t  b 
) [inline]

Definition at line 116 of file SYS_Align.h.

void SYSafree ( void *  p  )  [inline]

Definition at line 118 of file SYS_Align.h.

void* SYSamalloc ( size_t  b,
size_t   
) [inline]

Definition at line 119 of file SYS_Align.h.

void* SYSamalloc ( size_t  b  )  [inline]

Definition at line 115 of file SYS_Align.h.

void* SYSarealloc ( void *  p,
size_t  b,
size_t   
) [inline]

Definition at line 120 of file SYS_Align.h.

void* SYSarealloc ( void *  p,
size_t  b 
) [inline]

Definition at line 117 of file SYS_Align.h.


Generated on Thu May 24 00:09:05 2012 for HDK by  doxygen 1.5.9