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