tvm
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Typedefs | Functions | Variables
page_allocator.h File Reference

An implementation of a dynamic memory allocator for microcontrollers. More...

#include <stdlib.h>
#include <tvm/runtime/c_runtime_api.h>
#include <tvm/runtime/crt/error_codes.h>
Include dependency graph for page_allocator.h:

Go to the source code of this file.

Classes

struct  MemoryManagerInterface
 

Typedefs

typedef struct MemoryManagerInterface MemoryManagerInterface
 

Functions

tvm_crt_error_t PageMemoryManagerCreate (MemoryManagerInterface **manager, uint8_t *memory_pool, size_t memory_pool_size_bytes, size_t page_size_bytes_log2)
 

Variables

int vleak_size
 

Detailed Description

An implementation of a dynamic memory allocator for microcontrollers.

Typedef Documentation

◆ MemoryManagerInterface

Function Documentation

◆ PageMemoryManagerCreate()

tvm_crt_error_t PageMemoryManagerCreate ( MemoryManagerInterface **  manager,
uint8_t *  memory_pool,
size_t  memory_pool_size_bytes,
size_t  page_size_bytes_log2 
)

Exposed for testing.

Parameters
managerPointer, initialized with the new MemoryManager.
memory_poolPointer to the global memory pool used by the CRT.
memory_pool_size_bytesSize of memory_pool, in bytes.
page_size_bytes_log2log2 of the page size, in bytes.
Returns
kTvmErrorNoError on success.

Variable Documentation

◆ vleak_size

int vleak_size
extern