From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA21201; Tue, 28 Jan 2003 16:55:28 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA21311 for ; Tue, 28 Jan 2003 16:55:27 +0100 (MET) Received: from glow.phpwebhosting.com (Hosting-132-76.PHPWebHosting.Com [64.72.132.76] (may be forged)) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h0SFtQr09130 for ; Tue, 28 Jan 2003 16:55:27 +0100 (MET) Received: (qmail 22008 invoked by uid 508); 28 Jan 2003 15:55:27 -0000 Received: from unknown (HELO sparky) (24.163.168.219) by hosting-132-76.phpwebhosting.com with SMTP; 28 Jan 2003 15:55:27 -0000 Content-Type: text/plain; charset="us-ascii" From: Tom Hawkins Organization: Launchbird Design Systems, Inc. To: caml-list@inria.fr Subject: [Caml-list] Memory Consumption and Profiling. Date: Tue, 28 Jan 2003 10:01:13 -0600 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200301281001.13888.tom1@launchbird.com> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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=20 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= =2E 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