[compiler-rt] [scudo] Support no-preserve-all-regions mode (PR #85149)
Christopher Ferris via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 19:42:27 PDT 2024
================
@@ -601,6 +593,35 @@ template <typename Config> class SizeClassAllocator64 {
return BlockSize > PageSize;
}
+ void initRegion(RegionInfo *Region, uptr ClassId, MemMapT MemMap,
+ bool EnableRandomOffset) REQUIRES(Region->MMLock) {
+ DCHECK(!Region->MemMapInfo.MemMap.isAllocated());
+ DCHECK(MemMap.isAllocated());
+
+ const uptr PageSize = getPageSizeCached();
+ const uptr RegionBase = MemMap.getBase();
+
+ Region->MemMapInfo.MemMap = MemMap;
+
+ u32 Seed;
----------------
cferris1000 wrote:
Would it be better to move the seed generation to the caller? Doing it this way, you create a new seed for each region and are making a bunch of calls to getRandom/getMonotonicTimeFast.
https://github.com/llvm/llvm-project/pull/85149
More information about the llvm-commits
mailing list