wasm-micro-runtime/core/shared-lib/include/mem_alloc.h
Josh Triplett b0b0789dca Relicense to Apache-2.0 with the LLVM-exception (#137)
With agreement from contributors.
2019-11-12 07:45:21 +08:00

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 */