Name
SPVM::Document::NativeAPI::Allocator - SPVM Allocator Native APIs
Usage
// Allocator API
void* allocator_api = env->api->allocator;
// New allocator
void* allocator = allocator_api->new_object();
// Free allocator
allocator_api->free_object(allocator);
Description
SPVM Allocator Native APIs are the public APIs to alloc/free memories.
Ids Of Allocator Native APIs
Allocator native APIs have its IDs.
0 new_object
1 free_object
Allocator Native APIs
new_object
void* (*new_object)();
Create a new allocator object.
free_object
void (*free_object)(void* allocator);
Free an allocator object.
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License