[Lldb-commits] [PATCH] Don't use a random probe / allocation scheme in the IRMemoryMap
tfiala at google.com
Tue Jul 1 12:31:10 PDT 2014
Added a couple questions. Going to try the patch as is in a moment here.
Comment at: source/Expression/IRMemoryMap.cpp:76
@@ +75,3 @@
+ lldb::addr_t addr = back->first;
+ size_t size = back->second.m_size;
+ ret = llvm::RoundUpToAlignment(addr+size, 4096);
This now shadows the size argument to the function. Maybe rename it to something like allocation_size.
I think you also want to check if size (the argument to the function) + ret would bust the address space (i.e. validate that the requested size can really fit within the address space if it comes where the method suggests).
Are we guaranteed that these allocations are contiguous? If they're not contiguous, and if we do not have enough space at the end of the allocations, then that opens up a reason to look for holes earlier in the address space.
More information about the lldb-commits