Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Romain Beauxis <romain.beauxis@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] OCaml runtime using too much memory in 64-bit Linux
Date: Thu, 8 Nov 2007 21:51:00 +0100	[thread overview]
Message-ID: <200711082151.01017.romain.beauxis@gmail.com> (raw)
In-Reply-To: <4731F5D1.2070405@janestcapital.com>

Le Wednesday 07 November 2007 18:28:49 Adam Chlipala, vous avez écrit :
> A program that should be using just a few megabytes of RAM ends up using
> 200+ MB to store a page table.  It seems that a C macro is defined by
> default on 64-bit Linux to use mmap() instead of malloc().  Ironically,
> a comment says that this was done to avoid being given blocks of memory
> that are very far apart from each other, forcing the creation of overly
> large page tables.  It's ironic because that is exactly the problem that
> is showing up now with mmap().  It ends up called twice for the program
> I'm looking at, and the two addresses it returns are far enough apart to
> lead to creation of a 200 MB page table.


Unfortunatly, you can't compile without that option 
on amd64 archs, you'll get this error:
 
> boot/ocamlrun boot/ocamlc -nostdlib -I boot  -linkall -o ocaml.tmp toplevel/toplevellib.cma toplevel/topstart.cmo
>Fatal error: exception Out_of_memory


Romain


      parent reply	other threads:[~2007-11-08 20:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07 17:28 Adam Chlipala
2007-11-07 18:20 ` [Caml-list] " Gerd Stolpmann
2007-11-07 19:12   ` Adam Chlipala
2007-11-08 12:56     ` Samuel Mimram
2007-11-14  4:20     ` Romain Beauxis
2007-11-14 12:03       ` Vladimir Shabanov
2007-11-14 12:55         ` Xavier Leroy
2007-11-14 13:45           ` Brian Hurt
2007-11-14 14:16           ` Romain Beauxis
2007-11-14 15:56           ` Markus Mottl
2007-11-14 16:22           ` Stefan Monnier
2007-11-14 16:36             ` [Caml-list] " Brian Hurt
2007-11-14 17:08               ` Lionel Elie Mamane
2007-11-14 17:26               ` Stefan Monnier
2007-11-14 16:45             ` Lionel Elie Mamane
2007-11-14 17:08               ` Lionel Elie Mamane
2007-11-08 20:51 ` Romain Beauxis [this message]

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=200711082151.01017.romain.beauxis@gmail.com \
    --to=romain.beauxis@gmail.com \
    --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