diff --git a/src/libunwindstack/Memory.cpp b/src/libunwindstack/Memory.cpp index 0594a7a..ff78df7 100644 --- a/src/libunwindstack/Memory.cpp +++ b/src/libunwindstack/Memory.cpp @@ -206,6 +206,10 @@ std::shared_ptr Memory::CreateProcessMemoryLocalUnsafe() { return std::shared_ptr(new MemoryLocalUnsafe()); } +std::unique_ptr Memory::CreateLocalProcessMemory() { + return std::unique_ptr(new MemoryLocal()); +} + std::shared_ptr Memory::CreateProcessMemory(pid_t pid) { if (pid == getpid()) { return std::shared_ptr(new MemoryLocal()); diff --git a/src/libunwindstack/include/unwindstack/Memory.h b/src/libunwindstack/include/unwindstack/Memory.h index ec95bb4..4ef8c19 100644 --- a/src/libunwindstack/include/unwindstack/Memory.h +++ b/src/libunwindstack/include/unwindstack/Memory.h @@ -32,6 +32,7 @@ class Memory { Memory() = default; virtual ~Memory() = default; + static std::unique_ptr CreateLocalProcessMemory(); static std::shared_ptr CreateProcessMemory(pid_t pid); static std::shared_ptr CreateProcessMemoryCached(pid_t pid); static std::shared_ptr CreateProcessMemoryThreadCached(pid_t pid);