summaryrefslogtreecommitdiff
path: root/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
diff options
context:
space:
mode:
Diffstat (limited to 'www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h')
-rw-r--r--www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
new file mode 100644
index 000000000000..85a99bacad9e
--- /dev/null
+++ b/www/ungoogled-chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h
@@ -0,0 +1,29 @@
+--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2023-12-23 12:33:28 UTC
++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h
+@@ -94,7 +94,7 @@ static_assert(sizeof(void*) != 8, "");
+ // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific
+ // features such as futex(2).
+ #define PA_CONFIG_HAS_LINUX_KERNEL() \
+- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID))
++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD))
+
+ // On some platforms, we implement locking by spinning in userspace, then going
+ // into the kernel only if there is contention. This requires platform support,
+@@ -241,7 +241,7 @@ constexpr bool kUseLazyCommit = false;
+ // On these platforms, lock all the partitions before fork(), and unlock after.
+ // This may be required on more platforms in the future.
+ #define PA_CONFIG_HAS_ATFORK_HANDLER() \
+- (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
++ (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
+
+ // PartitionAlloc uses PartitionRootEnumerator to acquire all
+ // PartitionRoots at BeforeFork and to release at AfterFork.
+@@ -288,7 +288,7 @@ constexpr bool kUseLazyCommit = false;
+ // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to
+ // larger slot spans.
+ #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() \
+- (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)))
++ (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD))
+
+ // Enable shadow metadata.
+ //