Loading...
Searching...
No Matches
memory_manager.h
Go to the documentation of this file.
/* Copyright (c) the JPEG XL Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
#ifndef JXL_MEMORY_MANAGER_H_
#define JXL_MEMORY_MANAGER_H_
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef void* (*jpegxl_alloc_func)(void* opaque, size_t size);
typedef void (*jpegxl_free_func)(void* opaque, void* address);
typedef struct JxlMemoryManagerStruct {
void* opaque;
jpegxl_alloc_func alloc;
jpegxl_free_func free;
/* TODO(deymo): Add cache-aligned alloc/free functions here. */
} JxlMemoryManager;
#ifdef __cplusplus
}
#endif
#endif /* JXL_MEMORY_MANAGER_H_ */
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