IndexVirtual Memoryasmjit::JitAllocator::CreateParams
asmjit::JitAllocator::CreateParams Struct Reference

Parameters that can be passed to JitAllocator constructor.

Use it like this:

// Zero initialize (zero means the default value) and change what you need.
params.blockSize = 1024 * 1024;
// Create the allocator.
JitAllocator allocator(&params);

Public Members

Member Functions

JitAllocatorOptions JitAllocator::CreateParams::options = JitAllocatorOptions::kNone[¶]

Allocator options.

No options are used by default.

uint32_t JitAllocator::CreateParams::blockSize = 0[¶]

Base size of a single block in bytes (default 64kB).

Remarks
Block size must be equal to or greater than page size and must be power of 2. If the input is not valid then the default block size will be used instead.

uint32_t JitAllocator::CreateParams::granularity = 0[¶]

Base granularity (and also natural alignment) of allocations in bytes (default 64).

Since the JitAllocator uses bit-arrays to mark used memory the granularity also specifies how many bytes correspond to a single bit in such bit-array. Higher granularity means more waste of virtual memory (as it increases the natural alignment), but smaller bit-arrays as less bits would be required per a single block.

uint32_t JitAllocator::CreateParams::fillPattern = 0[¶]

Patter to use to fill unused memory.

Only used if JitAllocatorOptions::kCustomFillPattern is set.