OpenJPEG  1.5.1
opj_malloc.h File Reference

Internal functions. More...

#include <malloc.h>

Go to the source code of this file.

Exported functions

#define opj_malloc(size)   malloc(size)
 Allocate an uninitialized memory block. More...
 
#define opj_calloc(num, size)   calloc(num, size)
 Allocate a memory block with elements initialized to 0. More...
 
#define HAVE_MEMALIGN
 Allocate memory aligned to a 16 byte boundry. More...
 
#define opj_aligned_malloc(size)   malloc(size)
 
#define opj_aligned_free(m)   free(m)
 
#define opj_aligned_malloc(size)   memalign(16, (size))
 
#define opj_aligned_free(m)   free(m)
 
#define opj_realloc(m, s)   realloc(m, s)
 Reallocate memory blocks. More...
 
#define opj_free(m)   free(m)
 Deallocates or frees a memory block. More...
 
void * memalign (size_t, size_t)
 

Detailed Description

Internal functions.

The functions in opj_malloc.h are internal utilities used for memory management.

Macro Definition Documentation

◆ HAVE_MEMALIGN

#define HAVE_MEMALIGN

Allocate memory aligned to a 16 byte boundry.

Parameters
sizeBytes to allocate
Returns
Returns a void pointer to the allocated space, or NULL if there is insufficient memory available

◆ opj_aligned_free [1/2]

#define opj_aligned_free (   m)    free(m)

◆ opj_aligned_free [2/2]

#define opj_aligned_free (   m)    free(m)

◆ opj_aligned_malloc [1/2]

#define opj_aligned_malloc (   size)    malloc(size)

◆ opj_aligned_malloc [2/2]

#define opj_aligned_malloc (   size)    memalign(16, (size))

◆ opj_calloc

#define opj_calloc (   num,
  size 
)    calloc(num, size)

Allocate a memory block with elements initialized to 0.

Parameters
numBlocks to allocate
sizeBytes per block to allocate
Returns
Returns a void pointer to the allocated space, or NULL if there is insufficient memory available

◆ opj_free

#define opj_free (   m)    free(m)

Deallocates or frees a memory block.

Parameters
mPreviously allocated memory block to be freed

◆ opj_malloc

#define opj_malloc (   size)    malloc(size)

Allocate an uninitialized memory block.

Parameters
sizeBytes to allocate
Returns
Returns a void pointer to the allocated space, or NULL if there is insufficient memory available

◆ opj_realloc

#define opj_realloc (   m,
 
)    realloc(m, s)

Reallocate memory blocks.

Parameters
mPointer to previously allocated memory block
sNew size in bytes
Returns
Returns a void pointer to the reallocated (and possibly moved) memory block

Function Documentation

◆ memalign()

void* memalign ( size_t  ,
size_t   
)