AsmJit
Low-Latency Machine Code Generation
A simple implementation of memory manager that uses asmjit::VirtMem
functions to manage virtual memory for JIT compiled code.
Implementation notes:
kFlagUseMultiplePools
flag to be set.release()
and shrink()
. nullptr
)explicitnoexcept◆ Creates a JitAllocator
instance.
Destroys the JitAllocator
instance and release all blocks held.
ResetPolicy::kSoft
)noexcept◆ Free all allocated memory - makes all pointers returned by alloc()
invalid.
reset()
when the allocator is still in use. Returns allocator options, see Flags
.
Tests whether the allocator has the given option
set.
Returns a base block size (a minimum size of block that the allocator would allocate).
Returns granularity of the allocator.
Returns pattern that is used to fill unused memory if kFlagUseFillPattern
is set.
Allocates a new memory span of the requested size
.
Releases a memory block returned by alloc()
.
Frees extra memory allocated with rx
by shrinking it to the given newSize
.
Queries information about an allocated memory block that contains the given rx
, and writes it to out
.
If the pointer is matched, the function returns kErrorOk
and fills out
with the corresponding span.
Returns JIT allocator statistics.
Allocator implementation (private).