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
31typedef void* (*jpegxl_alloc_func)(void* opaque, size_t size);
32
41typedef void (*jpegxl_free_func)(void* opaque, void* address);
42
48typedef struct JxlMemoryManagerStruct {
51 void* opaque;
52
59
60 /* TODO(deymo): Add cache-aligned alloc/free functions here. */
62
63#if defined(__cplusplus) || defined(c_plusplus)
64}
65#endif
66
67#endif /* JXL_MEMORY_MANAGER_H_ */
void(* jpegxl_free_func)(void *opaque, void *address)
Definition: memory_manager.h:41
struct JxlMemoryManagerStruct JxlMemoryManager
void *(* jpegxl_alloc_func)(void *opaque, size_t size)
Definition: memory_manager.h:31
Definition: memory_manager.h:48
jpegxl_free_func free
Definition: memory_manager.h:58
void * opaque
Definition: memory_manager.h:51
jpegxl_alloc_func alloc
Definition: memory_manager.h:56