OpenJPEG 1.5.2
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)
 Allocate an uninitialized memory block.
 
#define opj_calloc(num, size)
 Allocate a memory block with elements initialized to 0.
 
#define HAVE_MEMALIGN
 Allocate memory aligned to a 16 byte boundry.
 
#define opj_aligned_malloc(size)
 
#define opj_aligned_free(m)
 
#define opj_aligned_malloc(size)
 
#define opj_aligned_free(m)
 
#define opj_realloc(m, s)
 Reallocate memory blocks.
 
#define opj_free(m)
 Deallocates or frees a memory block.
 
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)

◆ opj_aligned_free [2/2]

#define opj_aligned_free ( m)
Value:
free(m)

◆ opj_aligned_malloc [1/2]

#define opj_aligned_malloc ( size)

◆ opj_aligned_malloc [2/2]

#define opj_aligned_malloc ( size)
Value:
memalign(16, (size))
void * memalign(size_t, size_t)

◆ opj_calloc

#define opj_calloc ( num,
size )
Value:
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

Referenced by j2k_create_compress(), j2k_create_decompress(), j2k_read_siz(), j2k_setup_decoder(), j2k_setup_encoder(), jp2_create_decompress(), opj_create_compress(), opj_create_decompress(), opj_image_create(), opj_image_create0(), opj_jp2_check_color(), pi_create_decode(), pi_initialise_encode(), tcd_encode_tile(), tcd_init_encode(), tcd_malloc_decode(), tcd_malloc_encode(), tgt_create(), write_cidx(), write_phix(), write_ppix(), and write_thix().

◆ opj_free

◆ opj_malloc

◆ opj_realloc

#define opj_realloc ( m,
s )
Value:
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

Referenced by j2k_add_marker(), j2k_add_mhmarker(), j2k_add_tlmarker(), j2k_read_ppm(), j2k_read_ppt(), j2k_read_sod(), j2k_read_sot(), mqc_init_dec(), t2_decode_packet(), and t2_init_seg().

Function Documentation

◆ memalign()

void * memalign ( size_t ,
size_t  )
extern