[compiler-rt] 163f8e1 - Revert "[scudo] Temporariy dispatch region from `RegionBeg`"
Chia-hung Duan via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 14:50:15 PDT 2023
Author: Chia-hung Duan
Date: 2023-06-14T21:48:59Z
New Revision: 163f8e1b01a3e5cf51f698a1af9b8676120d8110
URL: https://github.com/llvm/llvm-project/commit/163f8e1b01a3e5cf51f698a1af9b8676120d8110
DIFF: https://github.com/llvm/llvm-project/commit/163f8e1b01a3e5cf51f698a1af9b8676120d8110.diff
LOG: Revert "[scudo] Temporariy dispatch region from `RegionBeg`"
This reverts commit 9d9a7732e14d7d4c0db7b46d6ebe588e8f43b951.
This was a workaround for some platform and it has been fixed in
bfa02523b2e7ed66368ea61866a474e55ef354a3
Differential Revision: https://reviews.llvm.org/D152964
Added:
Modified:
compiler-rt/lib/scudo/standalone/primary64.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/primary64.h b/compiler-rt/lib/scudo/standalone/primary64.h
index 209dfc90c65b7..7eaaae37c61c2 100644
--- a/compiler-rt/lib/scudo/standalone/primary64.h
+++ b/compiler-rt/lib/scudo/standalone/primary64.h
@@ -756,14 +756,8 @@ template <typename Config> class SizeClassAllocator64 {
}
// TODO: Consider allocating MemMap in init().
if (!Region->MemMap.isAllocated()) {
- // TODO: Ideally, a region should reserve RegionSize because the memory
- // between `RegionBeg` and region base is still belong to a region and
- // it's just not used. In order to make it work on every platform (some
- // of them don't support `remap()` across the unused range), dispatch
- // from `RegionBeg` for now.
- const uptr ReserveSize =
- RegionSize - (RegionBeg - getRegionBaseByClassId(ClassId));
- Region->MemMap = ReservedMemory.dispatch(RegionBeg, ReserveSize);
+ Region->MemMap = ReservedMemory.dispatch(
+ getRegionBaseByClassId(ClassId), RegionSize);
}
DCHECK(Region->MemMap.isAllocated());
More information about the llvm-commits
mailing list