- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, May 29, 2001 12:49 AM
Subject: Re: Why is there a space leak here?
David Bakin [EMAIL PROTECTED] writes:
Which of the various tools built-in or added to Hugs, GHC, NHC, etc.
would
help
David Bakin wrote:
That's a very nice visualization - exactly the kind of thing I was hoping
for. I grabbed your papers and will look over them for more information,
thanks very much for taking the trouble! The animations you sent me - and
the ones on your page - are really nice; it would
David Bakin writes:
:
| I have been puzzling over this for nearly a full day (getting this
| reduced version from my own code which wasn't working). In
| general, how can I either a) analyze code looking for a space leak
| or b) experiment (e.g., using Hugs) to find a space leak? Thanks!
On Tue, 29 May 2001, Tom Pledger wrote:
David Bakin writes:
a) Look at how much of the list needs to exist at any one time.
| -- This has a space leak, e.g., when reducing (length (foo1 100))
| foo1 m
| = take m v
| where
| v = 1 : flatten (map triple v)
|
Michal Gajda writes:
| On Tue, 29 May 2001, Tom Pledger wrote:
:
| When you consume the (3N)th cell of v, you can't yet garbage collect
| the Nth cell because it will be needed for generating the (3N+1)th,
| (3N+2)th and (3N+3)th.
|
| So, as you proceed along the list, about two
PROTECTED]
Sent: Monday, May 28, 2001 1:59 PM
Subject: Why is there a space leak here?
David Bakin writes:
:
| I have been puzzling over this for nearly a full day (getting this
| reduced version from my own code which wasn't working). In
| general, how can I either a) analyze code looking