asmjit::JitRuntime Class Reference
Inheritance diagram for asmjit::JitRuntime:
asmjit::Target

JIT execution runtime is a special Target that is designed to store and execute the generated code.

Public Members

- Public Attributes inherited from asmjit::Target

Member Functions

Construction & Destruction
Accessors
Utilities
- Public Member Functions inherited from asmjit::Target

Constructor & Destructor Documentation

JitRuntime::JitRuntime(const JitAllocator::CreateParams* params = nullptr)explicitnoexcept

Creates a JitRuntime instance.

JitRuntime::~JitRuntime()virtualnoexcept

Destroys the JitRuntime instance.

Member Function Documentation

JitAllocator* JitRuntime::allocator() constnoexcept

Returns the associated JitAllocator.

template<typename Func>
Error JitRuntime::add(Func* dst, CodeHolder* code)noexcept

Allocates memory needed for a code stored in the CodeHolder and relocates the code to the pointer allocated.

The beginning of the memory allocated for the function is returned in dst. If failed Error code is returned and dst is explicitly set to nullptr (this means that you don't have to set it to null before calling add()).

template<typename Func>
Error JitRuntime::release(Func p)noexcept

Releases p which was obtained by calling add().

Error JitRuntime::_add(void** dst, CodeHolder* code)virtualnoexcept

Type-unsafe version of add().

Error JitRuntime::_release(void* p)virtualnoexcept

Type-unsafe version of release().

Member Data Documentation

JitAllocator JitRuntime::_allocator

Virtual memory allocator.