LIBJXL
|
Abstraction functions used by JPEG XL to allocate memory. More...
#include <stddef.h>
Go to the source code of this file.
Classes | |
struct | JxlMemoryManagerStruct |
Typedefs | |
typedef void *(* | jpegxl_alloc_func) (void *opaque, size_t size) |
typedef void(* | jpegxl_free_func) (void *opaque, void *address) |
typedef struct JxlMemoryManagerStruct | JxlMemoryManager |
Abstraction functions used by JPEG XL to allocate memory.
typedef void *(* jpegxl_alloc_func) (void *opaque, size_t size) |
Allocating function for a memory region of a given size.
Allocates a contiguous memory region of size size
bytes. The returned memory may not be aligned to a specific size or initialized at all.
opaque | custom memory manager handle provided by the caller. |
size | in bytes of the requested memory region. |
0
if the memory can not be allocated, typedef void(* jpegxl_free_func) (void *opaque, void *address) |
Deallocating function pointer type.
This function MUST do nothing if address
is 0
.
opaque | custom memory manager handle provided by the caller. |
address | memory region pointer returned by jpegxl_alloc_func, or 0 |
typedef struct JxlMemoryManagerStruct JxlMemoryManager |
Memory Manager struct. These functions, when provided by the caller, will be used to handle memory allocations.