// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-//
-// This file defines the JITMemoryManagerInterface
-//
-//===----------------------------------------------------------------------===//
#ifndef LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
#define LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
class JITMemoryManager {
protected:
bool HasGOT;
-public:
+public:
JITMemoryManager() : HasGOT(false) {}
virtual ~JITMemoryManager();
/// setPoisonMemory - Setting this flag to true makes the memory manager
/// garbage values over freed memory. This is useful for testing and
- /// debugging, and is be turned on by default in debug mode.
+ /// debugging, and may be turned on by default in debug mode.
virtual void setPoisonMemory(bool poison) = 0;
//===--------------------------------------------------------------------===//
virtual void AllocateGOT() = 0;
/// isManagingGOT - Return true if the AllocateGOT method is called.
- ///
bool isManagingGOT() const {
return HasGOT;
}
virtual uint8_t *allocateSpace(intptr_t Size, unsigned Alignment) = 0;
/// allocateGlobal - Allocate memory for a global.
- ///
virtual uint8_t *allocateGlobal(uintptr_t Size, unsigned Alignment) = 0;
/// deallocateFunctionBody - Free the specified function body. The argument