15 #ifndef LLVM_EXECUTIONENGINE_SECTIONMEMORYMANAGER_H
16 #define LLVM_EXECUTIONENGINE_SECTIONMEMORYMANAGER_H
24 #include <system_error>
63 unsigned SectionID,
StringRef SectionName,
96 unsigned PendingPrefixIndex;
113 uint8_t *allocateSection(MemoryGroup &MemGroup, uintptr_t Size,
116 std::error_code applyMemoryGroupPermissions(MemoryGroup &MemGroup,
117 unsigned Permissions);
120 MemoryGroup RWDataMem;
121 MemoryGroup RODataMem;
126 #endif // LLVM_EXECUTION_ENGINE_SECTION_MEMORY_MANAGER_H
~SectionMemoryManager() override
virtual void invalidateInstructionCache()
Invalidate instruction cache for code sections.
uint8_t * allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName) override
Allocates a memory block of (at least) the given size suitable for executable code.
uint8_t * allocateDataSection(uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName, bool isReadOnly) override
Allocates a memory block of (at least) the given size suitable for executable code.
SectionMemoryManager()=default
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
static bool isReadOnly(const GlobalValue *GV)
This class encapsulates the notion of a memory block which has an address and a size.
void operator=(const SectionMemoryManager &)=delete
bool finalizeMemory(std::string *ErrMsg=nullptr) override
Update section-specific memory permissions and other attributes.
This is a simple memory manager which implements the methods called by the RuntimeDyld class to alloc...
StringRef - Represent a constant reference to a string, i.e.