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-16 (13:13)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] appending data to a mmap-ed file

On Dec 16, 2010, at 12:38 PM, Jesper Louis Andersen wrote:

> Simply have an Ocaml array of bytes or something such to
> store data into (my Ocaml representation specific knowledge is not up
> to par at the moment, but arrange it such that the byte-array has
> C-representation underneath.

The data comes from a C++ thread running a market data feed. I was planning to manage the memory-mapped file in the same thread and only notify OCaml when new data is available, after extending the memory mapping. It seems to be the simplest approach to me. 

I also need to launch a C++ thread from OCaml and talk to it but that's probably a subject for a new mailing list thread. 

	Thanks, Joel