diff options
author | Sean Callanan <scallanan@apple.com> | 2013-06-27 00:10:26 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2013-06-27 00:10:26 +0000 |
commit | 70cac8fd817cb1cfc6a120a8cda3b1a601bf6515 (patch) | |
tree | ae62221a346ddb06870bdaaa55f472323543ec86 /lldb/source/Expression/IRMemoryMap.cpp | |
parent | ba2c0b9de10cef942822568ab44fd0a81499a4c3 (diff) | |
download | bcm5719-llvm-70cac8fd817cb1cfc6a120a8cda3b1a601bf6515.tar.gz bcm5719-llvm-70cac8fd817cb1cfc6a120a8cda3b1a601bf6515.zip |
Remove the process's reservation cache and don't
bother checking if a region is safe to use. In
cases where regions need to be synthesized rather
than properly allocated, the memory reads required
to determine whether the area is used are
- insufficient, because intermediate locations
could be in use, and
- unsafe, because on some platforms reading from
memory can trigger events.
All this only makes a difference on platforms
where memory allocation in the target is impossible.
Behavior on platforms where it is possible should
stay the same.
<rdar://problem/14023970>
llvm-svn: 185046
Diffstat (limited to 'lldb/source/Expression/IRMemoryMap.cpp')
-rw-r--r-- | lldb/source/Expression/IRMemoryMap.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/lldb/source/Expression/IRMemoryMap.cpp b/lldb/source/Expression/IRMemoryMap.cpp index e2d4e2872c1..a83da2260e3 100644 --- a/lldb/source/Expression/IRMemoryMap.cpp +++ b/lldb/source/Expression/IRMemoryMap.cpp @@ -66,14 +66,6 @@ IRMemoryMap::FindSpace (size_t size) return ret; } - if (process_sp) - { - ret = process_sp->GetReservationCache().Find(size); - - if (ret != LLDB_INVALID_ADDRESS) - return ret; - } - for (int iterations = 0; iterations < 16; ++iterations) { lldb::addr_t candidate = LLDB_INVALID_ADDRESS; @@ -101,21 +93,9 @@ IRMemoryMap::FindSpace (size_t size) if (IntersectsAllocation(candidate, size)) continue; - - char buf[1]; - - Error err; - - if (process_sp && - (process_sp->ReadMemory(candidate, buf, 1, err) == 1 || - process_sp->ReadMemory(candidate + size, buf, 1, err) == 1)) - continue; - + ret = candidate; - - if (process_sp) - process_sp->GetReservationCache().Reserve(candidate, size); - + return ret; } @@ -416,8 +396,6 @@ IRMemoryMap::Free (lldb::addr_t process_address, Error &error) { if (process_sp->CanJIT() && process_sp->IsAlive()) process_sp->DeallocateMemory(allocation.m_process_alloc); // FindSpace allocated this for real - else - process_sp->GetReservationCache().Unreserve(allocation.m_process_alloc); // FindSpace registered this memory } break; |