diff options
author | Christopher Ferris <cferris@google.com> | 2014-01-27 18:32:14 -0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2014-01-27 18:32:14 -0800 |
commit | caf22aca3482e2fcc8bf443f911718a5021da1c9 (patch) | |
tree | c4954179726eee89fa5504c1ee51dcb37a39ba8c /runtime/mem_map.cc | |
parent | 7ea5dafc81b2bba7cabad26130bb75dc8f709803 (diff) | |
download | art-caf22aca3482e2fcc8bf443f911718a5021da1c9.zip art-caf22aca3482e2fcc8bf443f911718a5021da1c9.tar.gz art-caf22aca3482e2fcc8bf443f911718a5021da1c9.tar.bz2 |
Modify to use new BacktraceMap creation function.
Change-Id: I703ef4a26917678236b931d81b7e4c758754742b
Diffstat (limited to 'runtime/mem_map.cc')
-rw-r--r-- | runtime/mem_map.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc index d3b8236..0a3e1a1 100644 --- a/runtime/mem_map.cc +++ b/runtime/mem_map.cc @@ -19,6 +19,7 @@ #include <inttypes.h> #include <backtrace/BacktraceMap.h> +#include "UniquePtr.h" #include "base/stringprintf.h" #include "ScopedFd.h" #include "utils.h" @@ -55,12 +56,12 @@ static void CheckMapRequest(byte* addr, size_t byte_count) { uintptr_t base = reinterpret_cast<uintptr_t>(addr); uintptr_t limit = base + byte_count; - BacktraceMap map(getpid()); - if (!map.Build()) { + UniquePtr<BacktraceMap> map(BacktraceMap::Create(getpid())); + if (!map->Build()) { PLOG(WARNING) << "Failed to build process map"; return; } - for (BacktraceMap::const_iterator it = map.begin(); it != map.end(); ++it) { + for (BacktraceMap::const_iterator it = map->begin(); it != map->end(); ++it) { CHECK(!(base >= it->start && base < it->end) // start of new within old && !(limit > it->start && limit < it->end) // end of new within old && !(base <= it->start && limit > it->end)) // start/end of new includes all of old @@ -69,7 +70,7 @@ static void CheckMapRequest(byte* addr, size_t byte_count) { base, limit, static_cast<uintptr_t>(it->start), static_cast<uintptr_t>(it->end), it->name.c_str()) - << std::make_pair(it, map.end()); + << std::make_pair(it, map->end()); } } |