Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
appending data to a mmap-ed file
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-12-17 (19:05)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] appending data to a mmap-ed file
"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.