[Haskell-cafe] Space leaks

William Lee Irwin III wli at holomorphy.com
Tue Oct 5 23:02:15 EDT 2004

On Wed, Oct 06, 2004 at 12:27:35PM +1000, Ben Lippmeier wrote:
> Now imagine that state is some large structure. The [x] list is a couple 
> of hundred elements long, and you print out some -> but not all <- of 
> the [y] elements. While the [y] list remains live, a whole collection of 
>  half evaluated intermediate states also remain live -  enter the 
> massive space leak.
> Projects I have written which suffered massive space leaks include:
> -> A parallel lazy evaluator,
> http://cs.anu.edu.au/ample.
> The state:    the machine state, threads, stacks, the heaps.
> The [x] list: machine instructions.
> The [y] list: profiling info.
> If you don't print out all possible profiling info then all those 
> intermediate states remain live and you've got a massive space leak.
> -> An astroids game I wrote for X.
> The state:    position, velocities of ship, astroids, missiles.
> The [x] list: ship control data, key codes.
> The [y] list: a list of graphics prims which get rendered to the screen.

Know any tricks for 2D recurrences where only points along the i=j line
(which depend on all points where i <= j) are used for the final result?

-- wli

More information about the Haskell-Cafe mailing list