[haiku-commits] haiku: hrev53406 - src/system/libroot/posix/rpmalloc

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 26 Aug 2019 22:03:41 -0400 (EDT)

hrev53406 adds 1 changeset to branch 'master'
old head: 84dc116351944ec78e1c4a09b99fa8afec09c92d
new head: 60baa09ba02e7cef39cc5b616ddbd8a1ad73bc56
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=60baa09ba02e+%5E84dc11635194

----------------------------------------------------------------------------

60baa09ba02e: rpmalloc: Switch back to using 2MB heap areas instead of 4MB.
  
  There seem to be some cases that severely fragment rpmalloc's heap,
  wasting large amounts of memory (in #15264, some 750+MB it appears
  are wasted this way.) This is a stop-gap measure to cut the wastage
  in half (or more) until a proper solution is implemented.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53406
Commit:      60baa09ba02e7cef39cc5b616ddbd8a1ad73bc56
URL:         https://git.haiku-os.org/haiku/commit/?id=60baa09ba02e
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Tue Aug 27 02:01:48 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/15264

----------------------------------------------------------------------------

1 file changed, 4 insertions(+)
src/system/libroot/posix/rpmalloc/rpmalloc.cpp | 4 ++++

----------------------------------------------------------------------------

diff --git a/src/system/libroot/posix/rpmalloc/rpmalloc.cpp 
b/src/system/libroot/posix/rpmalloc/rpmalloc.cpp
index 4fd7fb9e9d..2bcb96cbef 100644
--- a/src/system/libroot/posix/rpmalloc/rpmalloc.cpp
+++ b/src/system/libroot/posix/rpmalloc/rpmalloc.cpp
@@ -61,9 +61,13 @@
 #define DISABLE_UNMAP             0
 #endif
 #ifndef DEFAULT_SPAN_MAP_COUNT
+#ifdef __HAIKU__
+#define DEFAULT_SPAN_MAP_COUNT    32
+#else
 //! Default number of spans to map in call to map more virtual memory (default 
values yield 4MiB here)
 #define DEFAULT_SPAN_MAP_COUNT    64
 #endif
+#endif
 
 #if ENABLE_THREAD_CACHE
 #ifndef ENABLE_UNLIMITED_CACHE


Other related posts:

  • » [haiku-commits] haiku: hrev53406 - src/system/libroot/posix/rpmalloc - waddlesplash