From be1a714a523332e53eec4a4a4829bb5eb0fd47cb Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 1 Jul 2025 00:18:32 -0400 Subject: [PATCH] libroot/malloc: Increase address space reservation size to 512 MB. The kernel will ignore the reservations if there's not enough space left in the address space anyway. It seems using larger reservations prevents address space fragmentation, and so this by itself may be enough to fix #19592. --- src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp b/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp index 816e133f2c..1a300c10e5 100644 --- a/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp +++ b/src/system/libroot/posix/malloc/openbsd/PagesAllocator.cpp @@ -27,7 +27,7 @@ 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 = 128 * 1024 * 1024; +static const size_t kReserveAddressSpace = 512 * 1024 * 1024; /*! Cache up to this many percentage points of free memory (compared to used.) */ static const size_t kFreePercentage = 25;