[Haskell-cafe] Re: Difficult memory leak in array processing

apfelmus at quantentunnel.de apfelmus at quantentunnel.de
Thu Nov 23 09:19:45 EST 2006

Udo Stenzel wrote:
> Niko Korhonen wrote:
>> I have the following code whose purpose is to add dither (noise) to a given
>> array. The code looks very straightforward but apparently it has a memory leak
>> somewhere.
> No, it doesn't.  It can't, because it doesn't even compile.  After
> correcting the obvious
>>         (lo, hi) <- getBounds buf
> to
>           let (lo,hi) = bounds buf

The interface changed between GHC 6.4.2 and 6.6.
But no honorable Haskell paladin would ever dare to use UndeadArrays.

> it just works and needs 40MB plus epsilon.  Your problem has to be
> somewhere else.

The strictness analyzer likes Udo more than Niko, does it?


More information about the Haskell-Cafe mailing list