From d9048aa4fc697a7866b1cb2c53593edbe8d95f5b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 2 Jul 2025 17:41:02 -0400 Subject: [PATCH] libroot/malloc: Increase address space reservation to 1GB. Similar to the debug malloc and the old hoard2. May help with #19592 a bit more. --- 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 1a300c10e5..7edfacc5ac 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 kPageSize = B_PAGE_SIZE; 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;