
Hi, If available memory is low, is the garbage collector going to eliminate data that is still referenced, but it knows it can be recalculated when needed? Thanks, Maurício

On Nov 27, 2007 10:43 AM, Maurício
Hi,
If available memory is low, is the garbage collector going to eliminate data that is still referenced, but it knows it can be recalculated when needed?
If I understand it correctly, when a thunk is evaluated, it is actually replaced by its value in memory. This suggests that once evaluated, it is impossible to reconstruct the code that was actually used to produce a given value (short of simply rerunning the entire program). The overhead of keeping around all the code necessary to reproduce any value would be enormous and would clearly cause far more problems with regards to memory usage than it solved. =) As far as I know, the garbage collector only deallocates memory that is no longer referenced. -Brent

This is an idea that has been kicking around for a long time. But no
Haskell implementation that I know of implements it.
On Nov 27, 2007 3:43 PM, Maurício
Hi,
If available memory is low, is the garbage collector going to eliminate data that is still referenced, but it knows it can be recalculated when needed?
Thanks, Maurício
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Brent Yorgey
-
Lennart Augustsson
-
Maurício