Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Memory Consumption and Profiling.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Tom Hawkins <tom1@l...>
Subject: [Caml-list] Memory Consumption and Profiling.
Hi,

Can anyone offer tips for profiling a program for memory consumption?

One of my native compiled applications consumes a too much memory
and I'm having a hard time tracking down the source.  I did time 
profiling with gprof and here are the top four consumers:

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls   s/call   s/call  name
 21.66      2.38     2.38     1040     0.00     0.00  mark_slice
 12.28      3.73     1.35     1035     0.00     0.00  sweep_slice
 10.19      4.85     1.12 13611466     0.00     0.00  compare_val
  4.73      5.37     0.52  1804453     0.00     0.00  Hashtbl__find_117

I'm assuming mark_slice and sweep_slice are part of the garbage collector.
The nature of the program does create a lot of small data structures with
short life span, and my hunch this is where the problem lies.

Any tips?

Thanks,

Tom

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners