diff options
author | Andrey Sverdlichenko <blaze@ruddy.ru> | 2018-01-31 21:33:58 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-01-31 23:28:06 -0500 |
commit | 0171e09e4d073d8466953ebbf01292e55829fb20 (patch) | |
tree | 4a939f8132e7568a497b96adddf23d4d74f62349 /rts/RetainerProfile.h | |
parent | 5f922fbbef56dd4f0133ffe07ab8f0ebcb58fbaf (diff) | |
download | haskell-0171e09e4d073d8466953ebbf01292e55829fb20.tar.gz |
Make RTS keep less memory (fixes #14702)
Currently runtime keeps hold to 4*used_memory. This includes, in
particular, nursery, which can be quite large on multiprocessor
machines: 16 CPUs x 64Mb each is 1GB. Multiplying it by 4 means whatever
actual memory usage is, runtime will never release memory under 4GB, and
this is quite excessive for processes which only need a lot of memory
shortly (think building data structures from large files).
This diff makes multiplier to apply only to GC-managed memory, leaving
all "static" allocations alone.
Test Plan: make test TEST="T14702"
Reviewers: bgamari, erikd, simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14702
Differential Revision: https://phabricator.haskell.org/D4338
Diffstat (limited to 'rts/RetainerProfile.h')
-rw-r--r-- | rts/RetainerProfile.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/rts/RetainerProfile.h b/rts/RetainerProfile.h index 6882a2a58a..bc11cc7e80 100644 --- a/rts/RetainerProfile.h +++ b/rts/RetainerProfile.h @@ -41,9 +41,7 @@ retainerSetOf( const StgClosure *c ) } // Used by Storage.c:memInventory() -#if defined(DEBUG) extern W_ retainerStackBlocks ( void ); -#endif #include "EndPrivate.h" |