summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2016-06-09 20:22:25 +0000
committerSean Callanan <scallanan@apple.com>2016-06-09 20:22:25 +0000
commitf3df7e86b40c970a423130b5717c3a636fb2e9b8 (patch)
treeccbbee0ef29a5584d2ddab18fe28173f1cdceb1a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent0ab9d3026ae951020510573e0d6cf41cacd0fabc (diff)
Updated the FindSpace() algorithm to avoid the 0 page when it's unsafe.
Previously we eliminated the randomized scheme for finding memory when the underlying process cannot allocate memory, and replaced it with an algorithm that starts the allocations at 00x. This was more determinstic, but runs into problems on embedded targets where the pages near 0x0 are in fact interesting memory. To deal with those cases, this patch does two things: - It makes the default fallback be an address that is less likely than 0x0 to contain interesting information. - Before falling back to this, it adds an algorithm that consults the GetMemoryRegionInfo() API to see if it can find an unmapped area. This should eliminate the randomness (and unpredictable memory accesseas) of the previous scheme while making expressions more likely to return correct results. <rdar://problem/25545573> llvm-svn: 272301
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions