Go to the documentation of this file.
9 #ifndef LLDB_TARGET_MEMORY_H
10 #define LLDB_TARGET_MEMORY_H
28 void Clear(
bool clear_invalid_ranges =
false);
44 const lldb::DataBufferSP &data_buffer_sp);
47 typedef std::map<lldb::addr_t, lldb::DataBufferSP>
BlockMap;
145 #endif // LLDB_TARGET_MEMORY_H
lldb::addr_t ReserveBlock(uint32_t size)
BaseType GetRangeBase() const
std::map< lldb::addr_t, lldb::DataBufferSP > BlockMap
Range< lldb::addr_t, lldb::addr_t > AddrRange
std::multimap< uint32_t, AllocatedBlockSP > PermissionsToBlockMap
AllocatedBlock(lldb::addr_t addr, uint32_t byte_size, uint32_t permissions, uint32_t chunk_size)
bool RemoveInvalidRange(lldb::addr_t base_addr, lldb::addr_t byte_size)
const uint32_t m_chunk_size
bool Contains(lldb::addr_t addr) const
bool DeallocateMemory(lldb::addr_t ptr)
AllocatedMemoryCache(Process &process)
RangeVector< lldb::addr_t, uint32_t > m_reserved_blocks
void Flush(lldb::addr_t addr, size_t size)
uint32_t TotalChunks() const
static llvm::raw_ostream & error(Stream &strm)
const uint32_t m_permissions
std::recursive_mutex m_mutex
uint32_t GetMemoryCacheLineSize() const
uint32_t CalculateChunksNeededForSize(uint32_t size) const
Range< lldb::addr_t, uint32_t > m_range
const MemoryCache & operator=(const MemoryCache &)=delete
void AddInvalidRange(lldb::addr_t base_addr, lldb::addr_t byte_size)
std::recursive_mutex m_mutex
bool FreeBlock(lldb::addr_t addr)
lldb::addr_t AllocateMemory(size_t byte_size, uint32_t permissions, Status &error)
MemoryCache(Process &process)
const AllocatedMemoryCache & operator=(const AllocatedMemoryCache &)=delete
InvalidRanges m_invalid_ranges
uint32_t GetChunkSize() const
uint32_t GetPermissions() const
AllocatedBlockSP AllocatePage(uint32_t byte_size, uint32_t permissions, uint32_t chunk_size, Status &error)
size_t Read(lldb::addr_t addr, void *dst, size_t dst_len, Status &error)
PermissionsToBlockMap m_memory_map
uint32_t m_L2_cache_line_byte_size
SizeType GetByteSize() const
void AddL1CacheData(lldb::addr_t addr, const void *src, size_t src_len)
uint32_t GetByteSize() const
A class that represents a running process on the host machine.
RangeVector< lldb::addr_t, uint32_t > m_free_blocks
lldb::addr_t GetBaseAddress() const
RangeVector< lldb::addr_t, lldb::addr_t, 4 > InvalidRanges
void Clear(bool clear_invalid_ranges=false)
bool Contains(BaseType r) const
std::shared_ptr< AllocatedBlock > AllocatedBlockSP