File 3583-erts-Decrease-super-alignment-on-64-bit.patch of Package erlang
From 96860fdcdb48bb0eb53e79758be072a2eb265a2e Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Mon, 19 Apr 2021 18:20:44 +0200
Subject: [PATCH 3/3] erts: Decrease super alignment on 64-bit
From 256kb to 16kb.
---
erts/emulator/beam/erl_alloc_util.h | 2 +-
erts/emulator/sys/common/erl_mmap.h | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/erts/emulator/beam/erl_alloc_util.h b/erts/emulator/beam/erl_alloc_util.h
index 359457913c..45e5bfc211 100644
--- a/erts/emulator/beam/erl_alloc_util.h
+++ b/erts/emulator/beam/erl_alloc_util.h
@@ -310,7 +310,7 @@ void erts_alcu_sched_spec_data_init(struct ErtsSchedulerData_ *esdp);
# ifdef MSEG_ALIGN_BITS
# define ERTS_SUPER_ALIGN_BITS MSEG_ALIGN_BITS
# else
-# define ERTS_SUPER_ALIGN_BITS 18
+# define ERTS_SUPER_ALIGN_BITS ERTS_MMAP_SUPERALIGNED_BITS
# endif
# ifdef ARCH_64
# define MBC_ABLK_OFFSET_BITS 23
diff --git a/erts/emulator/sys/common/erl_mmap.h b/erts/emulator/sys/common/erl_mmap.h
index d45bea7b6f..a34763a754 100644
--- a/erts/emulator/sys/common/erl_mmap.h
+++ b/erts/emulator/sys/common/erl_mmap.h
@@ -24,8 +24,12 @@
#include "sys.h"
#include "erl_printf.h"
-#define ERTS_MMAP_SUPERALIGNED_BITS (18)
+#if defined(ARCH_64)
+# define ERTS_MMAP_SUPERALIGNED_BITS (14)
+#else
+# define ERTS_MMAP_SUPERALIGNED_BITS (18)
/* Affects hard limits for sbct and lmbcs documented in erts_alloc.xml */
+#endif
#ifndef HAVE_MMAP
# define HAVE_MMAP 0
--
2.26.2