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=1.4 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 13401BB84 for ; Tue, 15 Jul 2008 19:06:30 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYAAB52fEhA6aq+d2dsb2JhbACRdUMBDAUCBAkPBZZFhjQ X-IronPort-AV: E=Sophos;i="4.30,367,1212357600"; d="scan'208";a="27347732" Received: from rn-out-0910.google.com ([64.233.170.190]) by mail4-smtp-sop.national.inria.fr with ESMTP; 15 Jul 2008 19:06:05 +0200 Received: by rn-out-0910.google.com with SMTP id v46so2558750rnb.20 for ; Tue, 15 Jul 2008 10:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=0Gyqb7d8SXrC8X10kT4eI3VUBjq8c5Jb2sUO8CRmqmY=; b=LL+6yR1C3iulEwcMwbwQqQ9SdsxYejwiTvWQTMBZBn/wn1NYM81XLGwpLCurC9/npH kbgTMMMgu3xAtj2NYnGwp9lIOV2uFsEMYymcSVa8/O43SpAJrrvxvqujf3+4Fm137BYR K/0B4R2tr4XYdQ05uE8xUXfNzTCMUgr47Xt6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=m9p91mn/eiY4ffNOEfmATI09xt66Hnwdw9OHHB8zCm36C/0Kafd6E54PzWgekrBGCs HXk44UpKsYL3tQOUM3dWAPKk8M6c7uTOOwotl87Cqu7RnWyAlW4hxtWovICb7FQKW9Hr J0ppkBQAdR82kgLnIp8kG0LGY/oQdBQoeaTD0= Received: by 10.142.70.11 with SMTP id s11mr4748524wfa.293.1216141563873; Tue, 15 Jul 2008 10:06:03 -0700 (PDT) Received: by 10.142.186.21 with HTTP; Tue, 15 Jul 2008 10:06:03 -0700 (PDT) Message-ID: Date: Tue, 15 Jul 2008 13:06:03 -0400 From: "Jean Krivine" Sender: jean.krivine@gmail.com To: "Richard Jones" Subject: Re: [Caml-list] memory usage Cc: caml-list@yquem.inria.fr In-Reply-To: <20080711220106.GA16853@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080711220106.GA16853@annexia.org> X-Google-Sender-Auth: f0a43f4895c25ea0 X-Spam: no; 0.00; krivine:01 krivine:01 ocaml:01 compiler:01 ocamlopt:01 ocaml:01 malloc:01 malloc:01 compiler:01 bug:01 beginner's:01 bug:01 hms:98 beginners:01 wrote:01 Dear all I downloaded the last version of ocaml (3.10.2) but I must confess I don't know what option I should pass to the compiler to make a binary that uses 64 bits. I tried naively ocamlopt -ccopt -arch -ccopt x86_64 but that doesn't work. Any idea? On Fri, Jul 11, 2008 at 6:01 PM, Richard Jones wrote: > 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >