api
alloc.ch
Declarations in alloc.ch
1 declarationsstd
Declarations
Public only
std#
Publicnamespace
namespace std
alloc#
Publicnamespace
namespace alloc
Layout#
Publicstruct
struct Layout {
var size : size_t
var align_ : size_t
}
AllocError#
Publicvariant
Allocator#
Publicinterface
interface Allocator
AllocRecord#
struct
Debug tracking types
DebugTracker#
struct
debug_tracker_create#
function
func debug_tracker_create() : *DebugTracker
debug_tracker_record_alloc#
function
func debug_tracker_record_alloc(tracker : *DebugTracker, ptr : *void, size : size_t) : void
debug_tracker_record_dealloc#
function
func debug_tracker_record_dealloc(tracker : *DebugTracker, ptr : *void) : void
debug_tracker_destroy#
function
func debug_tracker_destroy(tracker : *DebugTracker) : void
debug_tracker_print_leaks#
function
func debug_tracker_print_leaks(tracker : *DebugTracker) : void
GlobalAllocator#
Publicstruct
struct GlobalAllocator {
var _debug : *void
}
GlobalAllocator — wraps malloc/free with optional debug tracking
make#
PublicfunctionConstructor
func make() : GlobalAllocator
alloc#
Publicfunction
dealloc#
Publicfunction
grow#
Publicfunction
func grow(self : &GlobalAllocator, old : *void, old_layout : Layout, new_size : size_t) : Result<*void, AllocError>
shrink#
Publicfunction
func shrink(self : &GlobalAllocator, old : *void, old_layout : Layout, new_size : size_t) : Result<*void, AllocError>
alloc_zeroed#
Publicfunction
check_leaks#
Publicfunction
func check_leaks(self : &GlobalAllocator) : void
destroy#
Publicfunction
func destroy(self : &GlobalAllocator) : void
alloc_bytes#
Publicfunction
Convenience free functions (bypass GlobalAllocator)
dealloc_bytes#
Publicfunction
func dealloc_bytes(ptr : *void) : void
alloc_zeroed_bytes#
Publicfunction