From: "David McClain" <dmcclain@azstarnet.com>
To: <caml-list@inria.fr>
Subject: Memory management under OCAML
Date: Mon, 30 Aug 1999 10:54:06 -0700 [thread overview]
Message-ID: <000901bef310$b08c8ce0$210148bf@dylan> (raw)
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
next reply other threads:[~1999-08-31 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-30 17:54 David McClain [this message]
1999-08-31 20:00 ` Ching-Tsun Chou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000901bef310$b08c8ce0$210148bf@dylan' \
--to=dmcclain@azstarnet.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox