caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Jean Krivine <jean_krivine@hms.harvard.edu>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] memory usage
Date: Fri, 11 Jul 2008 23:01:06 +0100	[thread overview]
Message-ID: <20080711220106.GA16853@annexia.org> (raw)
In-Reply-To: <dc2907b70807111249r47416a1aof957bf8260947ecb@mail.gmail.com>

On Fri, Jul 11, 2008 at 03:49:26PM -0400, Jean Krivine wrote:
> I am trying to run a stochastic simulator (written in ocaml) on a huge
> data set and I have the following error message:

I can confirm that OCaml works fine with huge datasets, on 64 bit
platforms anyway.

> sim(9595) malloc: *** mmap(size=1048576) failed (error code=12)
> *** error: can't allocate region
> *** set a breakpoint in malloc_error_break to debug
> Fatal error: out of memory.
> 
> My system:
> 
> Mac Pro running OS X 10.5.4
> Processor:  2 x 2.8 GHz Quad-Core Intel Xeon
> Memory:  10 GB 800 MHz DDR2 FB-DIMM
> 
> Does someone know what happened? Do you have any idea of any parameter
> I could tune in order to avoid that?

Is the compiler 32 bits or 64 bits on this machine?  Try doing:

  $ ocaml
  # Sys.word_size ;;

It should print out either '32' or '64'.

Also run your program under whatever the OS X equivalent of 'strace'
is (ktrace?) to find out exactly why the mmap call fails.

OCaml <= 3.10.2 on Linux suffers a nasty problem with its use of mmap
and randomized address spaces
(https://bugzilla.redhat.com/show_bug.cgi?id=445545#c9) but it doesn't
seem like this is the same issue.

Rich.

-- 
Richard Jones
Red Hat


  parent reply	other threads:[~2008-07-11 22:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11 19:49 Jean Krivine
2008-07-11 21:49 ` [Caml-list] " Till Varoquaux
2008-07-11 22:01 ` Richard Jones [this message]
2008-07-15 17:06   ` Jean Krivine
2008-07-15 19:31     ` Andres Varon
2008-07-15 19:38       ` Jean Krivine
2008-07-16 14:16         ` Andres Varon
2008-07-16 16:27           ` Jean Krivine
2008-07-16 18:07             ` Jean Krivine
2008-07-16 18:44               ` Andres Varon
2008-07-16 18:54                 ` Jean Krivine
2009-01-12  7:41 John Lepikhin
2009-01-12  8:39 ` [Caml-list] " Richard Jones
2009-01-12  9:14   ` John Lepikhin
     [not found] ` <20090112114837.GB18405@janestcapital.com>
2009-01-12 15:05   ` John Lepikhin
2009-01-12 16:29 ` Florian Hars
2009-01-12 16:44   ` John Lepikhin
2017-01-30 16:39 [Caml-list] Memory Usage Umair Siddique
2017-01-30 16:42 ` Van Chan Ngo
2017-01-30 16:50   ` Evgeny Roubinchtein
2017-01-31 18:09     ` Umair Siddique
2017-02-01  9:04 ` Alain Frisch

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=20080711220106.GA16853@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=jean_krivine@hms.harvard.edu \
    /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).