13 #ifndef LLVM_SUPPORT_MEMORY_H 14 #define LLVM_SUPPORT_MEMORY_H 18 #include <system_error> 36 : Address(addr), AllocatedSize(allocatedSize) {}
37 void *
base()
const {
return Address; }
59 MF_RWE_MASK = 0x7000000,
71 MF_HUGE_HINT = 0x0000001
98 static MemoryBlock allocateMappedMemory(
size_t NumBytes,
101 std::error_code &EC);
112 static std::error_code releaseMappedMemory(
MemoryBlock &Block);
129 static std::error_code protectMappedMemory(
const MemoryBlock &Block,
135 static void InvalidateInstructionCache(
const void *Addr,
size_t Len);
155 void *
base()
const {
return M.base(); }
170 #endif // ifndef NDEBUG This class represents lattice values for constants.
size_t allocatedSize() const
The size as it was allocated.
This class provides various memory handling functions that manipulate MemoryBlock instances...
MemoryBlock(void *addr, size_t allocatedSize)
Optional< std::vector< StOtherPiece > > Other
static std::error_code releaseMappedMemory(MemoryBlock &Block)
This method releases a block of memory that was allocated with the allocateMappedMemory method...
OwningMemoryBlock(MemoryBlock M)
size_t allocatedSize() const
The size as it was allocated.
OwningMemoryBlock & operator=(OwningMemoryBlock &&Other)
This class encapsulates the notion of a memory block which has an address and a size.
Owning version of MemoryBlock.
OwningMemoryBlock(OwningMemoryBlock &&Other)
raw_ostream & operator<<(raw_ostream &OS, const Memory::ProtectionFlags &PF)
Debugging output for Memory::ProtectionFlags.
MemoryBlock getMemoryBlock() const
This class implements an extremely fast bulk output stream that can only output to a stream...