Re: patch applied (ghc): Rework the block allocator
Simon Marlow <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.all |
|---|---|
| Message-ID | <458267DA.40703__12912.851633928$1166174193$gmane$org@microsoft.com> |
Bulat Ziganshin wrote: > Hello Simon, > > Thursday, December 14, 2006, 2:35:12 PM, you wrote: > >> * Rework the block allocator > > > Simon, one more feature that i really missing in GHC now is ability to > *decrease* amount of memory allocated from OS. now, if at some point > program required 100 megs, it will hold all these 100 megs allocated until > program finishes and when mmeory goes low, this (unused!) memory will be > swapped to disk. can this be changed so that after GC memory returned back > to OS? Yes. Maybe after a major GC if we detect that we have a lot more memory allocated than was required by the previous GC, then we could release some. We have to be careful to avoid thrashing, so I suggest only doing it after a major GC and only when the extra memory exceeds some reasonably large threshold. I don't know how this interacts with Esa's MBlock implementation on Windows. Would you like to submit a feature request? Cheers, Simon