hi john,
On 22.09.10 13:14, John Lato wrote:
> > Now it works and reports the proper answer, but when I run the program
> with
> +RTS
> > -s it shows low memory usage. Very low.
> >
> > 40,488 bytes allocated in the heap
> > 1,484 bytes copied during GC
> > 6,124 bytes maximum residency (1 sample(s))
> > 14,356 bytes maximum slop
> > 1 MB total memory in use (0 MB lost due to fragmentation)
> >
> > However, the system monitor shows that the program is occupying about
> 230MB of
> > RAM. For my test file the this program reports:
> >
> > Info {frames = 17479453, samplerate = 44100, channels = 2, format =
> Format
> > {headerFormat = HeaderFormatWav, sampleFormat = SampleFormatPcm16,
> endianFormat
> > = EndianFile}, sections = 1, seekable = True}
> >
> > so 230MB seems consistent with allocating a single vector of Doubles.
> >
> > So my second question is, why is this memory usage not reported by +RTS
> -s,
> or -hT?
>
> i'm not sure either, maybe because the memory is allocated on the heap by
> malloc? this might indicate a memory leak, i'll investigate. i'm
> currently on
> the road and won't have the time to look into the problem before sunday
> ...
>
>
> I'll try asking on haskell-cafe, maybe somebody there will know.It's not at
> all
> urgent, so whenever you get a chance to look at it is fine by me. I doubt
> it's
> a memory leak in any case.
could you try the new version in the darcs repository
darcs get http://code.haskell.org/hsndfile
?
i think i've fixed a memory leak (there was a finalizer missing from the memory
allocated with mallocBytes) and i've also removed the lazy read functions from
the interface.
thanks + bst,
<sk>
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art