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 OAA29152 for caml-redistribution; Tue, 31 Aug 1999 14:14:35 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA05567 for ; Mon, 30 Aug 1999 20:21:35 +0200 (MET DST) Received: from cepheus.azstarnet.com (cepheus.azstarnet.com [169.197.56.195]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA03765 for ; Mon, 30 Aug 1999 20:21:34 +0200 (MET DST) Received: from dylan (dialup02ip051.tus.azstarnet.com [169.197.30.179]) by cepheus.azstarnet.com (8.9.3/8.9.3) with SMTP id KAA07999 for ; Mon, 30 Aug 1999 10:53:09 -0700 (MST) X-Sent-via: StarNet http://www.azstarnet.com/ Message-ID: <000901bef310$b08c8ce0$210148bf@dylan> From: "David McClain" To: Subject: Memory management under OCAML Date: Mon, 30 Aug 1999 10:54:06 -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 I am trying to understand the behavior of the interactive OCAML system. If I repeatedly perform the following line: let x = Array.create 1000000 0.0;; then each subsequent execution should shadow the previous ones making them unreachable. Yet the GC never collects the old bindings, even after I manually perform Gc.full_major() or Gc.compact(). Why is this? In another vein, whenever I start OCAML in interactive mode on WinNT 4.0 it grabs about 10 MBytes (give or take some). Yet when I compile my own code in native code OCAMLOPT, my programs typically grab about 100 MBytes or so, even before any overt memory allocations occur. Why is this? Should I even be concerned about it? and is there a mechanism to preallocate a fixed amount of heap for the runtime images I create? D. McClain Sr. Scientist Raytheon Systems Co. Tucson, AZ