⛏️ index : haiku.git

author Augustin Cavalier <waddlesplash@gmail.com> 2025-07-02 17:41:02.0 -04:00:00
committer Augustin Cavalier <waddlesplash@gmail.com> 2025-07-02 17:41:23.0 -04:00:00
commit
d9048aa4fc697a7866b1cb2c53593edbe8d95f5b [patch]
tree
113dca5dc3bb3cc6dba190c357ba4b2bdcacafdf
parent
e6de99eb01bf4c2e48564229125aca3aace88857
download
d9048aa4fc697a7866b1cb2c53593edbe8d95f5b.tar.gz

libroot/malloc: Increase address space reservation to 1GB.

Similar to the debug malloc and the old hoard2.

May help with #19592 a bit more.

Diff

 src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp b/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp
index 1a300c1..7edfacc 100644
--- a/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp
+++ b/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp
@@ -27,7 +27,9 @@
static const size_t kLargestUsefulChunk = 512 * kPageSize;

/*! Amount of virtual address space to reserve when creating new areas. */
static const size_t kReserveAddressSpace = 512 * 1024 * 1024;
/* (The Haiku kernel will ignore reservations if there's no other address
 * space left, so using a large value here should not hurt.) */
static const size_t kReserveAddressSpace = 1 * 1024 * 1024 * 1024;

/*! Cache up to this many percentage points of free memory (compared to used.) */
static const size_t kFreePercentage = 25;