
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()
. Creates a JitAllocator
instance.
Destroys the JitAllocator
instance and release all blocks held.
Tests whether the JitAllocator has been initialized.
Free all allocated memory - makes all pointers returned by alloc()
invalid.
reset()
when the allocator is still in use by other threads. 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.
Makes the memory pointed out by span
writable and writes data to ot at the given offset
.
This function reads src
and writes to span
at offset
the number of bytes a specified by size
.
Use policy
argument to specify an instruction cache flush behavior.
Makes the memory pointed out by span
writable and calls the provided callback function writeFunc
with userData
to perform the write operation.
Use policy
argument to specify an instruction cache flush behavior.
Makes the memory pointed out by span
writable and calls the provided lambda function lambdaFunc
to perform the write operation.
Use policy
argument to specify an instruction cache flush behavior.
Returns JIT allocator statistics.