caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Damien Doligez <Damien.Doligez@inria.fr>
To: caml-list@inria.fr
Subject: Re:  [GC] Evaluate memory use
Date: Mon, 22 Nov 1999 20:24:33 +0100	[thread overview]
Message-ID: <199911221924.UAA25229@tobago.inria.fr> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

>From: David.Mentre@irisa.fr (David =?iso-8859-1?q?Mentré?=)

[ short french:

 > Comment connaître la consommation mémoire maximum d'un programme OCaml

 Vous pouvez répéter la question ?
]


>Is there any way to know the maximum memory used by an OCaml program?

What do you mean exactly by "maximum memory used" ?  Is it the maximum
amount of memory allocated from the OS or the maximum amount used to
store useful data ?  In the first case, it's the current amount,
unless you activate the compacter; in the second case, there's no way
to get the right answer.


>Right now, I'm using Gc.heap_words, but it doesn't seem to be very

That's the current size of the major heap, including overhead and free
memory.  You could add "control.Gc.minor_heap_size" (from the result
of "Gc.get ()") to get the total size of the heaps.


>    let max_words_total = stats.Gc.minor_words - stats.Gc.promoted_words
>                          + stats.Gc.heap_words in

That just doesn't make sense.  It's the number of garbage words
collected by the minor GC (since the program started), added to the
current size of the major heap.


>BTW, is there any simple way to evaluate Wall Clock Time used by an
>OCaml program? Right now, I'm using 'Unix.gettimeofday ()'. Is there a
>simpler way to do it?

No, there's nothing simpler.  Is it not simple enough ?

-- Damien




             reply	other threads:[~1999-11-23 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-22 19:24 Damien Doligez [this message]
1999-11-23 15:53 ` David Mentré
  -- strict thread matches above, loose matches on Subject: below --
1999-11-24 16:12 Damien Doligez
1999-11-24 18:39 ` Matías Giovannini
1999-11-18 14:37 David Mentré

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=199911221924.UAA25229@tobago.inria.fr \
    --to=damien.doligez@inria.fr \
    --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;
as well as URLs for NNTP newsgroup(s).