Search in: Word
Vietnamese keyboard: Off
Virtual keyboard: Show
Computing (FOLDOC) dictionary
space leak
Jump to user comments
A data structure which grows bigger, or lives longer, than
might be expected. Such unexpected memory use can cause a
program to require more garbage collections or to run out of
heap. Space leaks in functional programs usually result
from excessive laziness. For example, the Haskell function
sum [] = 0
sum (x:xs) = x + sum xs
when applied to a list will build a chain of closures for the
additions and only when it reaches the end of the list will it
perform the additions and free the storage. Another example
is the function