LLDB mainline
lldb_private::AllocatedMemoryCache Class Reference

#include <Memory.h>

Public Member Functions

 AllocatedMemoryCache (Process &process)
 ~AllocatedMemoryCache ()
void Clear (bool deallocate_memory)
lldb::addr_t AllocateMemory (size_t byte_size, uint32_t permissions, Status &error)
bool DeallocateMemory (lldb::addr_t ptr)
bool IsInCache (lldb::addr_t addr) const

Protected Types

typedef std::shared_ptr< AllocatedBlockAllocatedBlockSP
typedef std::multimap< uint32_t, AllocatedBlockSPPermissionsToBlockMap

Protected Member Functions

AllocatedBlockSP AllocatePage (uint32_t byte_size, uint32_t permissions, uint32_t chunk_size, Status &error)

Protected Attributes

Processm_process
std::recursive_mutex m_mutex
PermissionsToBlockMap m_memory_map

Private Member Functions

 AllocatedMemoryCache (const AllocatedMemoryCache &)=delete
const AllocatedMemoryCacheoperator= (const AllocatedMemoryCache &)=delete

Detailed Description

Definition at line 114 of file Memory.h.

Member Typedef Documentation

◆ AllocatedBlockSP

Definition at line 131 of file Memory.h.

◆ PermissionsToBlockMap

Definition at line 139 of file Memory.h.

Constructor & Destructor Documentation

◆ AllocatedMemoryCache() [1/2]

AllocatedMemoryCache::AllocatedMemoryCache ( Process & process)

Definition at line 345 of file Memory.cpp.

References m_memory_map, m_mutex, and m_process.

Referenced by AllocatedMemoryCache(), and operator=().

◆ ~AllocatedMemoryCache()

AllocatedMemoryCache::~AllocatedMemoryCache ( )
default

References error().

◆ AllocatedMemoryCache() [2/2]

lldb_private::AllocatedMemoryCache::AllocatedMemoryCache ( const AllocatedMemoryCache & )
privatedelete

Member Function Documentation

◆ AllocateMemory()

lldb::addr_t AllocatedMemoryCache::AllocateMemory ( size_t byte_size,
uint32_t permissions,
Status & error )

◆ AllocatePage()

AllocatedMemoryCache::AllocatedBlockSP AllocatedMemoryCache::AllocatePage ( uint32_t byte_size,
uint32_t permissions,
uint32_t chunk_size,
Status & error )
protected

◆ Clear()

void AllocatedMemoryCache::Clear ( bool deallocate_memory)

Definition at line 350 of file Memory.cpp.

References m_memory_map, m_mutex, and m_process.

◆ DeallocateMemory()

bool AllocatedMemoryCache::DeallocateMemory ( lldb::addr_t ptr)

Definition at line 418 of file Memory.cpp.

References lldb_private::GetLog(), LLDB_LOGF, m_memory_map, m_mutex, and lldb_private::Process.

◆ IsInCache()

bool AllocatedMemoryCache::IsInCache ( lldb::addr_t addr) const

Definition at line 437 of file Memory.cpp.

References m_memory_map, and m_mutex.

◆ operator=()

const AllocatedMemoryCache & lldb_private::AllocatedMemoryCache::operator= ( const AllocatedMemoryCache & )
privatedelete

Member Data Documentation

◆ m_memory_map

PermissionsToBlockMap lldb_private::AllocatedMemoryCache::m_memory_map
protected

◆ m_mutex

std::recursive_mutex lldb_private::AllocatedMemoryCache::m_mutex
mutableprotected

Definition at line 138 of file Memory.h.

Referenced by AllocatedMemoryCache(), AllocateMemory(), Clear(), DeallocateMemory(), and IsInCache().

◆ m_process

Process& lldb_private::AllocatedMemoryCache::m_process
protected

Definition at line 137 of file Memory.h.

Referenced by AllocatedMemoryCache(), AllocatePage(), and Clear().


The documentation for this class was generated from the following files: