Internal functions.
More...
#include <malloc.h>
Go to the source code of this file.
Internal functions.
The functions in opj_malloc.h are internal utilities used for memory management.
◆ HAVE_MEMALIGN
Allocate memory aligned to a 16 byte boundry.
- Parameters
-
- 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
-
num | Blocks to allocate |
size | Bytes 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
-
m | Previously allocated memory block to be freed |
◆ opj_malloc
#define opj_malloc |
( |
|
size | ) |
malloc(size) |
Allocate an uninitialized memory block.
- Parameters
-
- Returns
- Returns a void pointer to the allocated space, or NULL if there is insufficient memory available
◆ opj_realloc
#define opj_realloc |
( |
|
m, |
|
|
|
s |
|
) |
| realloc(m, s) |
Reallocate memory blocks.
- Parameters
-
m | Pointer to previously allocated memory block |
s | New size in bytes |
- Returns
- Returns a void pointer to the reallocated (and possibly moved) memory block
◆ memalign()
void * memalign |
( |
size_t |
, |
|
|
size_t |
|
|
) |
| |
|
extern |