LIBJXL: /build/libjxl/src/libjxl/lib/include/jxl/memory_manager.h Source File

LIBJXL

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
11#ifndef JXL_MEMORY_MANAGER_H_
12#define JXL_MEMORY_MANAGER_H_
13
14#include <stddef.h>
15
16#if defined(__cplusplus) || defined(c_plusplus)
17extern "C" {
18#endif
19
31 typedef void* (*jpegxl_alloc_func)(void* opaque, size_t size);
32
41 typedef void (*jpegxl_free_func)(void* opaque, void* address);
42
48 typedef struct JxlMemoryManagerStruct {
51 void* opaque;
52
56 jpegxl_alloc_func alloc;
58 jpegxl_free_func free;
59
60 /* TODO(deymo): Add cache-aligned alloc/free functions here. */
61} JxlMemoryManager;
62
63#if defined(__cplusplus) || defined(c_plusplus)
64}
65#endif
66
67#endif /* JXL_MEMORY_MANAGER_H_ */
jpegxl_free_func
void(* jpegxl_free_func)(void *opaque, void *address)
Definition: memory_manager.h:41
JxlMemoryManager
struct JxlMemoryManagerStruct JxlMemoryManager
jpegxl_alloc_func
void *(* jpegxl_alloc_func)(void *opaque, size_t size)
Definition: memory_manager.h:31
JxlMemoryManagerStruct
Definition: memory_manager.h:48
JxlMemoryManagerStruct::free
jpegxl_free_func free
Definition: memory_manager.h:58
JxlMemoryManagerStruct::opaque
void * opaque
Definition: memory_manager.h:51
JxlMemoryManagerStruct::alloc
jpegxl_alloc_func alloc
Definition: memory_manager.h:56