[compiler-rt] [scudo] Add EnableMultiRegions mode (PR #98076)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 16:33:42 PDT 2024


================
@@ -93,9 +93,11 @@ template <class Derived, typename MemMapTy> class ReservedMemory {
   constexpr ReservedMemory() = default;
 
   // Reserve a chunk of memory at a suggested address.
-  bool create(uptr Addr, uptr Size, const char *Name, uptr Flags = 0) {
+  bool create(uptr Addr, uptr Size, const char *Name, uptr Flags = 0,
+              uptr Alignment = getPageSizeCached()) {
----------------
cferris1000 wrote:

Would it be better to change the alignment to be something like AlignmentPages and have the default be 1?

A lot of the places are checking that alignment is equal to getPageSizeCached() which is free on Android (most of the time), but is not as free on devices that don't have a hard-coded page size.

https://github.com/llvm/llvm-project/pull/98076


More information about the llvm-commits mailing list