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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 3B393BC57 for ; Sat, 18 Dec 2010 10:57:08 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEBAHcUDE3UGyoFkWdsb2JhbACDZJIJMY4WFQEBAQEJCwoHEQMhrDuQQYRWdASKNoN8 X-IronPort-AV: E=Sophos;i="4.60,192,1291590000"; d="asc'?vcf'?scan'208";a="84352040" Received: from smtp5-g21.free.fr ([212.27.42.5]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Dec 2010 10:57:07 +0100 Received: from Tocksi.local (unknown [78.240.16.62]) by smtp5-g21.free.fr (Postfix) with ESMTP id E8EFFD4808F for ; Sat, 18 Dec 2010 10:57:00 +0100 (CET) Message-ID: <4D0C8567.6060609@univ-savoie.fr> Date: Sat, 18 Dec 2010 10:56:55 +0100 From: Christophe Raffalli User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] appending data to a mmap-ed file References: <8D1E9D5B-188C-4AF3-980B-EF229BA98FB4@gmail.com> In-Reply-To: <8D1E9D5B-188C-4AF3-980B-EF229BA98FB4@gmail.com> X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4A11F32D176E83B65B3280E4" X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 appending:01 appending:01 ocaml:01 ocaml:01 indirection:01 cheers:01 beginner's:01 bug:01 chablais:01 73376:01 X-Attachments: cset="utf-8" name="Christophe_Raffalli.vcf" name="Christophe_Raffalli.vcf" type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4A11F32D176E83B65B3280E4 Content-Type: multipart/mixed; boundary="------------070307000008060305080805" This is a multi-part message in MIME format. --------------070307000008060305080805 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Le 16/12/10 12:31, Joel Reymont a =E9crit : > I'm constantly appending to a file of stock quotes (ints, longs, double= s, etc.). I have this file mapped into memory with mmap.=20 > > 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 O= Caml. > =20 > Thanks, Joel euh: mremap ? M=EAme 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 =2E.. 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 > --=20 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=20 can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------070307000008060305080805 Content-Type: text/x-vcard; charset=utf-8; name="Christophe_Raffalli.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Christophe_Raffalli.vcf" begin:vcard fn:Christophe Raffalli n:Raffalli;Christophe org:LAMA (UMR 5127) email;internet:christophe.raffalli@univ-savoie.fr title;quoted-printable:Ma=3DC3=3DAEtre de conf=3DC3=3DA9rences 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 --------------070307000008060305080805-- --------------enig4A11F32D176E83B65B3280E4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFNDIVri9jr/RgYAS4RAnx1AKCGvWj2LH3pZmcN0Sps5CN/JD8jXwCfSjIs 6VF33TKHscUT4KsQiKkHZaY= =dCte -----END PGP SIGNATURE----- --------------enig4A11F32D176E83B65B3280E4--