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 
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)
19 extern "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 
62 
63  /* TODO(deymo): Add cache-aligned alloc/free functions here. */
65 
66 #if defined(__cplusplus) || defined(c_plusplus)
67 }
68 #endif
69 
70 #endif /* JXL_MEMORY_MANAGER_H_ */
71 
void(* jpegxl_free_func)(void *opaque, void *address)
Definition: memory_manager.h:44
void *(* jpegxl_alloc_func)(void *opaque, size_t size)
Definition: memory_manager.h:33
struct JxlMemoryManagerStruct JxlMemoryManager
Definition: memory_manager.h:51
jpegxl_free_func free
Definition: memory_manager.h:61
void * opaque
Definition: memory_manager.h:54
jpegxl_alloc_func alloc
Definition: memory_manager.h:59