Two-dimensional memory management


Functions

void * xmalloc (size_t size)
void ** malloc_2D (int width, int height, int size)
void free_2D (void **ptr, int width, int height)

Detailed Description


Function Documentation

void* xmalloc ( size_t  size  ) 

Memory allocation

This function allocates one-dimensional array of desired size.

Parameters:
size Size in bytes
Returns:
Array pointer
Warning:
This function halts program if all virtual memory is exhausted.

Referenced by alloc_linked_list(), alloc_LIS_slots(), alloc_list_node(), analysis_2D(), eps_decode_grayscale_block(), eps_decode_truecolor_block(), eps_encode_grayscale_block(), eps_encode_truecolor_block(), eps_get_fb_info(), eps_xmalloc(), malloc_2D(), speck_decode(), speck_encode(), and synthesis_2D().

void** malloc_2D ( int  width,
int  height,
int  size 
)

Two-dimensional memory allocation

This function allocates two-dimensional array of desired size.

Parameters:
width Array width
height Array height
size Element size
Returns:
Array pointer
Warning:
This function halts program if all virtual memory is exhausted.

References xmalloc().

Referenced by eps_decode_grayscale_block(), eps_decode_truecolor_block(), eps_encode_grayscale_block(), eps_encode_truecolor_block(), and eps_malloc_2D().

void free_2D ( void **  ptr,
int  width,
int  height 
)

Two-dimensional memory releasing

This function releases two-dimensional array allocated by malloc_2D.

Parameters:
ptr Array pointer
width Array width
height Array height
Returns:
VOID

Referenced by eps_decode_grayscale_block(), eps_decode_truecolor_block(), eps_encode_grayscale_block(), eps_encode_truecolor_block(), and eps_free_2D().


Generated on Fri May 27 14:50:00 2011 for EPSILON by  doxygen 1.5.6