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