llvm::RuntimeDyld::MemoryManager::allocateCodeSection

Allocate a memory block suitable for executable code.

Synopsis

Declared in <llvm/ExecutionEngine/RuntimeDyld.h>

virtual
uint8_t*
allocateCodeSection(
    uintptr_t Size,
    unsigned int Alignment,
    unsigned int SectionID,
    StringRef SectionName) = 0;

Description

The SectionID is a unique identifier assigned by the RuntimeDyld instance, and optionally recorded by the memory manager to access a loaded section.

Return Value

Pointer to the allocated code memory, or nullptr on failure.

Parameters

NameDescription
SizeMinimum number of bytes to allocate.
AlignmentRequired alignment of the allocated block.
SectionIDUnique identifier for the section being allocated.
SectionNameName of the section being allocated.