Machine Code Generation for C++
A simple implementation of memory manager that uses
asmjit::VirtMem functions to manage virtual memory for JIT compiled code.
kFlagUseMultiplePoolsflag to be set.
Enables the use of an anonymous memory-mapped memory that is mapped into two buffers having a different pointer.
The first buffer has read and execute permissions and the second buffer has read+write permissions.
See VirtMem::allocDualMapping() for more details about this feature.
Enables the use of multiple pools with increasing granularity instead of a single pool.
This flag would enable 3 internal pools in total having 64, 128, and 256 bytes granularity.
This feature is only recommended for users that generate a lot of code and would like to minimize the overhead of
Always fill reserved memory by a fill-pattern.
Causes a new block to be cleared by the fill pattern and freshly released memory to be cleared before making it ready for another use.
When this flag is set the allocator would immediately release unused blocks during
When this flag is not set the allocator would keep one empty block in each pool to prevent excessive virtual memory allocations and deallocations in border cases, which involve constantly allocating and deallocating a single block caused by repetitive calling
Use a custom fill pattern, must be combined with
JitAllocator instance and release all blocks held.
Free all allocated memory - makes all pointers returned by
Returns allocator options, see
Tests whether the allocator has the given
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.
size bytes of virtual memory.
Release a memory returned by
Free extra memory allocated with
p by restricting it to
Returns JIT allocator statistics.
Allocator implementation (private).