diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-06-14 15:32:17 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-06-14 15:32:17 +0000 |
commit | eca926ab3ab639b156c51035200c1df05adc7d44 (patch) | |
tree | 6e0ee796216567424647d62cd92c32745ef63b2f /llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp | |
parent | 1c15ee26316e9d87cfc8f4b502c2f62e55d28a55 (diff) | |
download | bcm5719-llvm-eca926ab3ab639b156c51035200c1df05adc7d44.tar.gz bcm5719-llvm-eca926ab3ab639b156c51035200c1df05adc7d44.zip |
[sanitizer] MmapAlignedOrDie changes to reduce fragmentation
Summary:
The reasoning behind this change is explained in D33454, which unfortunately
broke the Windows version (due to the platform not supporting partial unmapping
of a memory region).
This new approach changes `MmapAlignedOrDie` to allow for the specification of
a `padding_chunk`. If non-null, and the initial allocation is aligned, this
padding chunk will hold the address of the extra memory (of `alignment` bytes).
This allows `AllocateRegion` to get 2 regions if the memory is aligned
properly, and thus help reduce fragmentation (and saves on unmapping
operations). As with the initial D33454, we use a stash in the 32-bit Primary
to hold those extra regions and return them on the fast-path.
The Windows version of `MmapAlignedOrDie` will always return a 0
`padding_chunk` if one was requested.
Reviewers: alekseyshl, dvyukov, kcc
Reviewed By: alekseyshl
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D34152
llvm-svn: 305391
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp')
0 files changed, 0 insertions, 0 deletions