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.raffa...@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: Christophe_Raffalli.vcf>>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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

Reply via email to