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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 0583BBC57 for ; Fri, 17 Dec 2010 20:05:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjgBAGdDC03ZSMDqkWdsb2JhbACkMRUBAQEBCQsKBxEDIcEwhUoEjhc X-IronPort-AV: E=Sophos;i="4.60,189,1291590000"; d="scan'208";a="92796185" Received: from fmmailgate03.web.de ([217.72.192.234]) by mail1-smtp-roc.national.inria.fr with ESMTP; 17 Dec 2010 20:05:22 +0100 Received: from smtp01.web.de ( [172.20.0.243]) by fmmailgate03.web.de (Postfix) with ESMTP id 4159C17F2A162; Fri, 17 Dec 2010 20:05:22 +0100 (CET) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp01.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1PTfcI-0008UB-00; Fri, 17 Dec 2010 20:05:22 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.72) (envelope-from ) id 1PTfcH-0006ZY-HQ; Fri, 17 Dec 2010 20:05:21 +0100 From: Goswin von Brederlow To: "Richard W.M. Jones" Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] appending data to a mmap-ed file References: <8D1E9D5B-188C-4AF3-980B-EF229BA98FB4@gmail.com> <20101216171617.GB3647@annexia.org> <87aak5jkvg.fsf@frosties.localnet> <20101217144850.GC3647@annexia.org> Date: Fri, 17 Dec 2010 20:05:21 +0100 In-Reply-To: <20101217144850.GC3647@annexia.org> (Richard W. M. Jones's message of "Fri, 17 Dec 2010 14:48:50 +0000") Message-ID: <871v5gte32.fsf@frosties.localnet> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX19w8qfDWtSaMdvqAqmdltT+1Jul8DrjdupibgUw D60WBaBUoekz+F9c6sz38Wka9/Ikc9/4pj664oMlYLCZ8+51el 4W4G1UzTY= X-Spam: no; 0.00; appending:01 0100,:01 appending:01 chunks:01 mfg:98 wrote:01 dynamically:01 caml-list:01 writes:01 data:02 data:02 kernel:02 sparse:04 complex:05 fri:05 "Richard W.M. Jones" writes: > On Fri, Dec 17, 2010 at 01:36:35AM +0100, Goswin von Brederlow wrote: >> Or avoid the whole issue and make the file large enough to begin >> with. Thanks to sparse files you can create a huge file that only uses 1 >> block on disk. Then you can mmap that and it will use up more disk space >> as you fill in data automatically. > > Sure, if you have an upper limit. Neither works well on 32 bit > architectures where you're really limited for contiguous free address > space. > > Rich. Which has nothing to do with appending to a mmap-ed file. You are already in trouble if the file too big to begin with. If you need more than 1-3GB mapped on 32bit then you need to map it dynamically in chunks as needed, which gets a hell of a lot more complex. Frankly at that point I would just buy a 64bit cpu or install a 64bit kernel on the one you have. MfG Goswin