From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 2B05FBBAF for ; Mon, 30 Nov 2009 23:21:15 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugAAKPTE0vD2MUqmWdsb2JhbACbeQEBAQEBCAsKBxO8WoQxBA X-IronPort-AV: E=Sophos;i="4.47,316,1257116400"; d="scan'208";a="51272452" Received: from bluelynx4.ukhost4u.com ([195.216.197.42]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Nov 2009 23:21:14 +0100 Received: from [78.105.203.81] (helo=muscat.lan) by bluelynx4.ukhost4u.com with esmtpa (Exim 4.69) (envelope-from ) id 1NFEcK-0005KJ-Tl; Mon, 30 Nov 2009 22:21:13 +0000 Subject: Re: [Caml-list] Stack size on OS X Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: John Whitington In-Reply-To: <4B143E93.6070702@univ-savoie.fr> Date: Mon, 30 Nov 2009 22:21:10 +0000 Cc: OCaml Content-Transfer-Encoding: quoted-printable Message-Id: <31C9E407-C330-4F79-82F3-73C3CEBE60B4@coherentgraphics.co.uk> References: <4B13E43E.2010602@univ-savoie.fr> <0B58D6B2-D154-4D52-9F93-3A0E000FAE37@coherentgraphics.co.uk> <4B143E93.6070702@univ-savoie.fr> To: Christophe Raffalli X-Mailer: Apple Mail (2.1077) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bluelynx4.ukhost4u.com X-AntiAbuse: Original Domain - inria.fr X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Spam: no; 0.00; christophe:01 christophe:01 raffalli:01 ocaml:01 cheers:01 100,000:98 wrote:01 stack:01 stack:01 heap:01 heap:01 caml-list:01 compiling:02 graphics:02 codebase:96 Hi Christophe, On 30 Nov 2009, at 21:52, Christophe Raffalli wrote: not carefull, > although quite rare in OCaml). >> On first compiling my codebase (about 100,000 lines) on a machine = with limited stack size, it took only about a day to fix up. >>=20 >> I agree that, morally, stack space available and general memory = available should be roughly equivalent concepts (like with Linux), but = sometimes it's easier to give in - after all, how are you to estimate = the size you actually need accurately? >>=20 > I do not understand what you mean ? stack size + heap size =3D maximum = of > available memory as in linux is the best ? In the sense that, since Linux expands the stack as needed, one needn't = worry about a program which uses x Mb of stack being any more likely to = 'crash' than one which uses x Mb of heap. So, the total usage of a program (stack + heap) is the only metric = needed. Unless (as you say) performance is to be considered. Cheers, --=20 John Whitington Director, Coherent Graphics Ltd http://www.coherentpdf.com/