profile not showing it all?

Bulat Ziganshin bulatz at
Fri Sep 9 11:54:16 EDT 2005

Hello Duncan,

Friday, September 09, 2005, 5:17:06 PM, you wrote:

>> btw, i suggested to GHC team auto-switching to compacting algorithm
>> when program begins swapping. you can vote for this suggestion if it
>> what you need ;)

DC> That's much easier said than done. Automatically picking an optimal heap
DC> size for the current machine VM pressure is not so easy. Most OSs do not
DC> give any advice to apps on how much memory they can sensibly make use of
DC> or even tell you in any sensible manner when they are starting to
DC> thrash.

in windows it can be made, by example, simply by comparing value of
available physical memory at moment of starting GC with size of heap.
if availbale physical memory is smaller, then it have meaning to start
compacting algorithm instead of copying. compacting algorithm runs
about 2 times slower if there is enough memory, but when swapping
occurs it will be many times faster, of course

you can see that dicussion with SimonM in this maillist under subject
"garbage collection"

Best regards,
 Bulat                            mailto:bulatz at

More information about the Glasgow-haskell-users mailing list