mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-09 00:15:07 +00:00
35 lines
592 B
C
35 lines
592 B
C
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
*/
|
|
|
|
#ifndef __MEM_ALLOC_H
|
|
#define __MEM_ALLOC_H
|
|
|
|
#include <inttypes.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void *mem_allocator_t;
|
|
|
|
mem_allocator_t
|
|
mem_allocator_create(void *mem, uint32_t size);
|
|
|
|
void
|
|
mem_allocator_destroy(mem_allocator_t allocator);
|
|
|
|
void *
|
|
mem_allocator_malloc(mem_allocator_t allocator, uint32_t size);
|
|
|
|
void
|
|
mem_allocator_free(mem_allocator_t allocator, void *ptr);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* #ifndef __MEM_ALLOC_H */
|
|
|