ffi_utils
library
Classes
-
Arena
-
An Allocator which frees all allocations at the same time.
-
Utf16
-
The contents of a native zero-terminated array of UTF-16 code units.
-
Utf8
-
The contents of a native zero-terminated array of UTF-8 code units.
Constants
-
calloc
→ const CallocAllocator
-
Uses global memory instance to manage memory.
-
malloc
→ const MallocAllocator
-
Uses global memory instance to manage memory.
Functions
-
using<R>(R computation(Arena), [Allocator wrappedAllocator = calloc])
→ R
-
Runs
computation
with a new Arena, and releases all allocations at the
end.
-
withZoneArena<R>(R computation(), [Allocator wrappedAllocator = calloc])
→ R
-
Creates a zoned Arena to manage native resources.