LLDB mainline
|
#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) |
Protected Types | |
typedef std::shared_ptr< AllocatedBlock > | AllocatedBlockSP |
typedef std::multimap< uint32_t, AllocatedBlockSP > | PermissionsToBlockMap |
Protected Member Functions | |
AllocatedBlockSP | AllocatePage (uint32_t byte_size, uint32_t permissions, uint32_t chunk_size, Status &error) |
Protected Attributes | |
Process & | m_process |
std::recursive_mutex | m_mutex |
PermissionsToBlockMap | m_memory_map |
Private Member Functions | |
AllocatedMemoryCache (const AllocatedMemoryCache &)=delete | |
const AllocatedMemoryCache & | operator= (const AllocatedMemoryCache &)=delete |
|
protected |
|
protected |
AllocatedMemoryCache::AllocatedMemoryCache | ( | Process & | process | ) |
Definition at line 345 of file Memory.cpp.
|
default |
|
privatedelete |
lldb::addr_t AllocatedMemoryCache::AllocateMemory | ( | size_t | byte_size, |
uint32_t | permissions, | ||
Status & | error | ||
) |
Definition at line 387 of file Memory.cpp.
References AllocatePage(), error(), lldb_private::GetLog(), lldb_private::GetPermissionsAsCString(), LLDB_INVALID_ADDRESS, LLDB_LOGF, m_memory_map, m_mutex, and lldb_private::Process.
Referenced by lldb_private::Process::AllocateMemory().
|
protected |
Definition at line 361 of file Memory.cpp.
References lldb_private::Process::DoAllocateMemory(), error(), lldb_private::GetLog(), lldb_private::GetPermissionsAsCString(), LLDB_INVALID_ADDRESS, LLDB_LOGF, m_memory_map, m_process, and lldb_private::Process.
Referenced by AllocateMemory().
void AllocatedMemoryCache::Clear | ( | bool | deallocate_memory | ) |
Definition at line 350 of file Memory.cpp.
References lldb_private::Process::DoDeallocateMemory(), lldb_private::Process::IsAlive(), m_memory_map, m_mutex, and m_process.
Referenced by lldb_private::Process::DidExec(), and lldb_private::Process::Finalize().
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.
Referenced by lldb_private::Process::DeallocateMemory().
|
privatedelete |
|
protected |
Definition at line 138 of file Memory.h.
Referenced by AllocateMemory(), AllocatePage(), Clear(), and DeallocateMemory().
|
protected |
Definition at line 136 of file Memory.h.
Referenced by AllocateMemory(), Clear(), and DeallocateMemory().
|
protected |
Definition at line 135 of file Memory.h.
Referenced by AllocatePage(), and Clear().