From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id C6B47BBAF for ; Sat, 12 Jul 2008 00:01:10 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAIF1d0hQRFuw/2dsb2JhbACqeQ X-IronPort-AV: E=Sophos;i="4.30,347,1212357600"; d="scan'208";a="27252046" Received: from furbychan.cocan.org ([80.68.91.176]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 12 Jul 2008 00:01:09 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1KHQfr-0004Rf-67; Fri, 11 Jul 2008 23:01:07 +0100 Date: Fri, 11 Jul 2008 23:01:06 +0100 To: Jean Krivine Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] memory usage Message-ID: <20080711220106.GA16853@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; krivine:01 ocaml:01 ocaml:01 malloc:01 malloc:01 compiler:01 bug:01 wrote:01 caml-list:01 data:02 parameter:02 sys:03 redhat:03 spaces:04 size:95 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