BatchAllocator.ch

Declarations

Public Only
BatchAllocator
Publicinterface
interface BatchAllocator
allocate_size
Publicfunction
func allocate_size(self : &BatchAllocator, obj_size : size_t, alignment : size_t) : *char
* allocate a pointer with given object size, you must destruct the allocated pointer * otherwise there'll be a memory leak
allocate_str_size
PublicfunctionExtension
func allocate_str_size(allocator : &BatchAllocator, size : size_t) : *char
adds +1 to size to accomodate for the last null terminator \0 in string
allocate_str
PublicfunctionExtension
func allocate_str(allocator : &BatchAllocator, data : *char, size : size_t) : *char
allocate_view
PublicfunctionExtension
func allocate_view(allocator : &BatchAllocator, view : &string_view) : string_view