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
13#ifndef JXL_MEMORY_MANAGER_H_
14#define JXL_MEMORY_MANAGER_H_
15
16#include <stddef.h>
17
18#if defined(__cplusplus) || defined(c_plusplus)
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
59 jpegxl_alloc_func alloc;
61 jpegxl_free_func free;
62
63 /* TODO(deymo): Add cache-aligned alloc/free functions here. */
64} JxlMemoryManager;
65
66#if defined(__cplusplus) || defined(c_plusplus)
67}
68#endif
69
70#endif /* JXL_MEMORY_MANAGER_H_ */
71
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:61
JxlMemoryManagerStruct::opaque
void * opaque
Definition: memory_manager.h:54
JxlMemoryManagerStruct::alloc
jpegxl_alloc_func alloc
Definition: memory_manager.h:59