logo       

ghc releasing memory during compilation: msg#00064

lang.haskell.glasgow.bugs

Subject: ghc releasing memory during compilation

Sunday, March 12, 2006, 8:00:05 PM, you wrote:

ghbrho> Subject: ghc releasing memory during compilation

ghbrho> Am I right in thinking that ghc's rts can free memory back to the system
ghbrho> when the heap pressure reduces (at least if it's doing a compacting GC)?

ghbrho> In this case if it can do so, it should be quite dramatic. It'd ought to
ghbrho> be able to go from 400Mb back down to just a few Mb or so.

i've suggested the same just 11 months ago. after long discussion
Simon Marlow declined my proposal because this will raise gc times in
the situations when memory is enough by whole 10%! when i suggested
just to check available PHYSICAL memory he answered that he don't know
that is physical memory, only virtual memory matters

sorry for my style, but i've proposed rather detailed solution of this
problem and i'm discontented what i was not heard at that time :(

... you can find details in thread starting with the following letter:

2) if, for example, program's data before GC is 80 mb and after GC is
60 mb then the program will occupy after GC the whole 140 mb and ALL
this space will be marked by OS as used! if there's a memory shortage,
old program data even can be swapped to disk despite the fact that we
absolutely don't need them! that behaviour significantly enlarge
memory needs of GHC-compiled programs

if this unused memory will be returned to OS or marked as unneeded
after GC then will problem will go on. preferably this must be done
during the time of GC, on each page which contents has been already
compacted. in this case such program will never use more than 80mb of
real memory (+ 1 page + memory for GC)


--
Best regards,
Bulat mailto:Bulat.Ziganshin@xxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise