LIBJXL: jxl/memory_manager.h Source File

LIBJXL

Loading...
Searching...
No Matches
memory_manager.h
Go to the documentation of this file.
1/* Copyright (c) the JPEG XL Project Authors. All rights reserved.
2 *
3 * Use of this source code is governed by a BSD-style
4 * license that can be found in the LICENSE file.
5 */
6
12
13#ifndef JXL_MEMORY_MANAGER_H_
14#define JXL_MEMORY_MANAGER_H_
15
16#include <stddef.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
33 typedef void* (*jpegxl_alloc_func)(void* opaque, size_t size);
34
44 typedef void (*jpegxl_free_func)(void* opaque, void* address);
45
51 typedef struct JxlMemoryManagerStruct {
54 void* opaque;
55
60 jpegxl_alloc_func alloc;
62 jpegxl_free_func free;
63
64 /* TODO(deymo): Add cache-aligned alloc/free functions here. */
65} JxlMemoryManager;
66
67#ifdef __cplusplus
68}
69#endif
70
71#endif /* JXL_MEMORY_MANAGER_H_ */
72
jpegxl_free_func
void(* jpegxl_free_func)(void *opaque, void *address)
Definition memory_manager.h:44
JxlMemoryManager
struct JxlMemoryManagerStruct JxlMemoryManager
jpegxl_alloc_func
void *(* jpegxl_alloc_func)(void *opaque, size_t size)
Definition memory_manager.h:33
JxlMemoryManagerStruct
Definition memory_manager.h:51
JxlMemoryManagerStruct::free
jpegxl_free_func free
Definition memory_manager.h:62
JxlMemoryManagerStruct::opaque
void * opaque
Definition memory_manager.h:54
JxlMemoryManagerStruct::alloc
jpegxl_alloc_func alloc
Definition memory_manager.h:60