From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA25419 for caml-red; Sat, 30 Sep 2000 14:54:27 +0200 (MET DST) 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 BAA13518 for ; Sat, 30 Sep 2000 01:06:30 +0200 (MET DST) Received: from cepheus.azstarnet.com (cepheus.azstarnet.com [169.197.56.195]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e8TN6SL11267 for ; Sat, 30 Sep 2000 01:06:28 +0200 (MET DST) Received: from dylan (dialup04ip011.tus.azstarnet.com [169.197.31.139]) by cepheus.azstarnet.com (8.9.3/8.9.3) with SMTP id QAA29597 for ; Fri, 29 Sep 2000 16:06:19 -0700 (MST) X-Sent-via: StarNet http://www.azstarnet.com/ Message-ID: <003001c02a6a$5df967e0$210148bf@dylan> From: "David McClain" To: Subject: Fw: Garbage collection in OCaml Date: Fri, 29 Sep 2000 16:09:48 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: weis@pauillac.inria.fr Sorry... I should have mentioned that these trials were running on Win/NT 4.0 SP3 platforms. OCaml version 3.00, with MASM 6.11. Cheers! - DM -----Original Message----- From: David McClain To: caml-list@inria.fr Date: Friday, September 29, 2000 3:50 PM Subject: Garbage collection in OCaml >Hi, > >I have a long running analysis program written in compiled OCaml (ocamlopt). >If I let it run without interference it gradually allocates more and more >memory until the system swap space is exhausted. At that point the program >bombs off with an "out of memory" errror - probably generated by the OCaml >array management routines. > >OTOH, I found by tinkering that placing a Gc.compact() in a periodically >performed place, I manage to keep the entire system running within about 70 >MBytes. (My machines all have 256 MB RAM or more). > >I have found that placing a Gc.full_major() does virtually nothing to >prevent the exhaustion of memory, although it slows it down ever so >slightly. > >The program was compiled to run with the default GC settings (whatever those >are). That is to say, I did nothing to configure the GC system at program >startup. > >Is this behavior normal? Must I plant strategic Gc.compact() in my code? I >would have thought the GC would be more self monitoring. Your comments are >most welcome, even if they are critical! > >Cheers, > >David McClain, Sr. Scientist >Raytheon Missile Systems Co. >Tucson, AZ > >