From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] appending data to a mmap-ed file
Date: Sat, 18 Dec 2010 10:56:55 +0100 [thread overview]
Message-ID: <4D0C8567.6060609@univ-savoie.fr> (raw)
In-Reply-To: <8D1E9D5B-188C-4AF3-980B-EF229BA98FB4@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1639 bytes --]
Le 16/12/10 12:31, Joel Reymont a écrit :
> I'm constantly appending to a file of stock quotes (ints, longs, doubles, etc.). I have this file mapped into memory with mmap.
>
> What's the most efficient way to make newly appended data available as part of the memory mapping?
>
> Obligatory OCaml content: I'm trying to prototype a trading system in OCaml.
>
> Thanks, Joel
euh: mremap ? Même si ce n'est pas super portable ...
It can fails especially if you disallow adress change ...
I would access all mmapped data through an indirection and let mremap
move the data
... On systems without mremap, I would unmap and mmap ...
By the way, if the file is large, you could mmap it partially only, on
demand ...
Cheers,
Christophe
> ---
> http://twitter.com/wagerlabs
>
> _______________________________________________
> 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
>
--
Christophe Raffalli
Universite de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex
tel: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------
[-- Attachment #1.2: Christophe_Raffalli.vcf --]
[-- Type: text/x-vcard, Size: 310 bytes --]
begin:vcard
fn:Christophe Raffalli
n:Raffalli;Christophe
org:LAMA (UMR 5127)
email;internet:christophe.raffalli@univ-savoie.fr
title;quoted-printable:Ma=C3=AEtre de conf=C3=A9rences
tel;work:+33 4 79 75 81 03
note:http://www.lama.univ-savoie.fr/~raffalli
x-mozilla-html:TRUE
version:2.1
end:vcard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
prev parent reply other threads:[~2010-12-18 9:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 11:31 Joel Reymont
2010-12-16 12:38 ` [Caml-list] " Jesper Louis Andersen
2010-12-16 13:13 ` Joel Reymont
2010-12-16 12:57 ` Gerd Stolpmann
2010-12-16 17:16 ` Richard W.M. Jones
2010-12-17 0:36 ` Goswin von Brederlow
2010-12-17 14:48 ` Richard W.M. Jones
2010-12-17 15:49 ` Joel Reymont
2010-12-17 19:05 ` Goswin von Brederlow
2010-12-18 9:56 ` Christophe Raffalli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D0C8567.6060609@univ-savoie.fr \
--to=christophe.raffalli@univ-savoie.fr \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox