caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Chris King" <colanderman@gmail.com>
To: "Alexander Fuchs" <alexander.fuchs@uni-koblenz.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Limiting Memory Usage
Date: Fri, 14 Jul 2006 08:52:40 -0400	[thread overview]
Message-ID: <875c7e070607140552s2d2fe962n43f8fd7502ccb9eb@mail.gmail.com> (raw)
In-Reply-To: <44B711FC.7000001@uni-koblenz.de>

On 7/13/06, Alexander Fuchs <alexander.fuchs@uni-koblenz.de> wrote:
> I would like to:
> - limit the max. memory usage of an ocaml program
> - and do some cleanup and then terminate then program, when this limit
> is reached.
>
> I couldn't see how to do that with the standard libraries,

Did you look at Gc?  It's not a hard limit but periodically checking
(quick_stat ()).heap_words will give you a rough estimate of how much
memory your program is using (not exact since it doesn't count
code/stack/etc.).

- Chris King


  reply	other threads:[~2006-07-14 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-14  3:39 Alexander Fuchs
2006-07-14 12:52 ` Chris King [this message]
2006-07-15 17:04   ` [Caml-list] " Alexander Fuchs
2006-07-17  8:15 ` Damien Doligez

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=875c7e070607140552s2d2fe962n43f8fd7502ccb9eb@mail.gmail.com \
    --to=colanderman@gmail.com \
    --cc=alexander.fuchs@uni-koblenz.de \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).