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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 3CAD8BC57 for ; Thu, 16 Dec 2010 14:13:31 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMAACufCU1KfVIukGdsb2JhbACkLQgVAQEBAQkJDAcRBCCnJYlwghhmhEsuiFcBAQMFhUUEin2DF2k X-IronPort-AV: E=Sophos;i="4.59,354,1288566000"; d="scan'208";a="82885497" Received: from mail-ww0-f46.google.com ([74.125.82.46]) by mail4-smtp-sop.national.inria.fr with ESMTP; 16 Dec 2010 14:13:30 +0100 Received: by wwj40 with SMTP id 40so2318803wwj.3 for ; Thu, 16 Dec 2010 05:13:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=dMc922f2EFzaKYEz00C3Tex2xxFvOMMM8pGVLff5qKA=; b=eXg2aMHzh00Jr2KBr+RG7pbiRfGDwzwUVH5d6dcIOEwYYVEsXD/MLGILNzWT6hutpC FB2954GYVcFweencj2pbt3kdviX4oZraoHNnCbi/r0jRm+T1nI+66lIEwSHnCZXztI01 Cz8F14QQ8+td86UpjciJodbQWpY2rrSIJav7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=koFYNNwgfK9RKqoe5xqU9P5fXrUdEZU85kRvCFGPPS/dktVHb56oONK9lv8ROf420+ wD5H8iSdCUEnnbiimtWFuL0ybDCGJC9ht6iWApNeFNEnDJyNxVWhxx3E5CsrfdVslIAh nc34oJMtqp3SdY/EzggDxU1B/dpv0br0Sj7G8= Received: by 10.227.134.82 with SMTP id i18mr778473wbt.50.1292505210656; Thu, 16 Dec 2010 05:13:30 -0800 (PST) Received: from [192.168.0.192] (32.Red-79-151-44.dynamicIP.rima-tde.net [79.151.44.32]) by mx.google.com with ESMTPS id m10sm32666wbc.4.2010.12.16.05.13.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 16 Dec 2010 05:13:29 -0800 (PST) Subject: Re: [Caml-list] appending data to a mmap-ed file Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Joel Reymont In-Reply-To: Date: Thu, 16 Dec 2010 13:13:25 +0000 Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: quoted-printable Message-Id: <5923F3B9-6794-4C87-9ED3-C0EA5078014B@gmail.com> References: <8D1E9D5B-188C-4AF3-980B-EF229BA98FB4@gmail.com> To: Jesper Louis Andersen X-Mailer: Apple Mail (2.1082) X-Spam: no; 0.00; appending:01 ocaml:01 ocaml:01 andersen:98 wrote:01 caml-list:01 data:02 data:02 simplest:02 seems:03 bytes:03 dec:05 thread:06 thread:06 probably:07 Jesper, 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.=20 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.=20 Thanks, Joel --- http://twitter.com/wagerlabs