Another space leak question

Juan Carlos Arevalo Baeza jcab@roningames.com
Mon, 02 Jul 2001 14:31:17 -0700


At 08:44 AM 7/3/2001 +1200, Tom Pledger wrote:

>Juan Carlos Arevalo Baeza writes:
>  :
>  | Couldn't the garbage collector start doing reductions as soon as it
>  | can't free up enough heap?
>  :
>
>Despite their name, reductions don't necessarily reduce space use.

    Well, certainly not all, but certainly some of them would. (7+1) can 
always be reduced down to 8, which does reduce space. Thus the necessary 
heuristics.

>For more details, see:
>
>     http://haskell.org/pipermail/haskell/2001-June/001303.html

    Yes, I remember that message. Still, it seems to me that a good RTS can 
(and should) be sophisticated enough to exhaust all reduction possibilities 
before giving up and aborting the program. Garbage collection is one (very 
necessary) such thing. Forced reduction like I was saying is another 
possible such thing.

    Only thing I can think of as a disadvantage to having this 
functionality is that it promotes the creation of inefficient programs.


    Salutaciones,
                               JCAB

---------------------------------------------------------------------
Juan Carlos "JCAB" Arevalo Baeza    | http://www.roningames.com
Senior Technology Engineer          | mailto:jcab@roningames.com
Ronin Entertainment                 | ICQ: 101728263
                        (my opinions are only mine)
JCAB's Rumblings is so off-line O:-(