#include <page_allocator.h>
◆ Allocate
Allocate a chunk of memory.
- Parameters
-
interface | Pointer to this structure. |
num_bytes | Number of bytes requested. |
dev | Execution device that will be used with the allocated memory. Must be {kDLCPU, 0}. |
out_ptr | A pointer to which is written a pointer to the newly-allocated memory. |
- Returns
- kTvmErrorNoError if successful; a descriptive error code otherwise.
◆ Free
Free a chunk of previously-used memory.
- Parameters
-
interface | Pointer to this structure. |
ptr | A pointer returned from TVMPlatformMemoryAllocate which should be free'd. |
dev | Execution device passed to TVMPlatformMemoryAllocate. Fixed to {kDLCPU, 0}. |
- Returns
- kTvmErrorNoError if successful; a descriptive error code otherwise.
◆ vleak_size
int MemoryManagerInterface::vleak_size |
Used in testing; the number of allocated objects.
The documentation for this struct was generated from the following file: