forked from OSchip/llvm-project
[scudo] Do not consider releasing unallocated pages
We already know that there are no free blocks above Region->AllocatedUser. This results in a smaller RegionPageMap and faster releaseFreeMemoryToOS. Patch By: fabio-d Differential Revision: https://reviews.llvm.org/D138794
This commit is contained in:
parent
c995120968
commit
12e20a446e
|
@ -691,7 +691,8 @@ private:
|
|||
const uptr GroupSize = (1U << GroupSizeLog);
|
||||
const uptr AllocatedUserEnd = Region->AllocatedUser + Region->RegionBeg;
|
||||
ReleaseRecorder Recorder(Region->RegionBeg, &Region->Data);
|
||||
PageReleaseContext Context(BlockSize, RegionSize, /*NumberOfRegions=*/1U);
|
||||
PageReleaseContext Context(BlockSize, Region->AllocatedUser,
|
||||
/*NumberOfRegions=*/1U);
|
||||
|
||||
const uptr CompactPtrBase = getCompactPtrBaseByClassId(ClassId);
|
||||
auto DecompactPtr = [CompactPtrBase](CompactPtrT CompactPtr) {
|
||||
|
|
Loading…
Reference in New Issue