On Wed, Nov 21, 2007 at 01:31:35PM +0000, Gracjan Polak wrote: > > Hi, > > My program is eating too much memory: > > The source.txt is 800kb, and I expect files of size 100 times more, say 80MB, > so > using -H800M will not help here much. > > The profile -p says: > > COST CENTRE MODULE %time %alloc > > xparse PdfModel 78.1 95.0
You're using the wrong type of profiling for this job. -p is intended for people who want their programs to go faster; and %alloc is raw allocations, showing how to divide the GC cost. Since you are allocating 100 times more data than is being retained, the %alloc figures are quite uncorrelated with leakiness. But you don't want to make your program faster - you want to make it leaner. You want one of the heap profiling flags, described in: http://haskell.org/ghc/dist/current/docs/users_guide/prof-heap.html Note that heap profiling is even more a black art than time profiling; you may need to do a lot of experimentation to find an enlightening profile. Stefan
signature.asc
Description: Digital signature
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
