From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA07841; Mon, 8 Oct 2001 21:25:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA07821 for ; Mon, 8 Oct 2001 21:25:15 +0200 (MET DST) Received: from mail1.microsoft.com (mail1.microsoft.com [131.107.3.125]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f98JPDv26715 for ; Mon, 8 Oct 2001 21:25:14 +0200 (MET DST) Received: from inet-vrs-01.redmond.corp.microsoft.com ([157.54.8.27]) by mail1.microsoft.com with Microsoft SMTPSVC(5.0.2195.2966); Mon, 8 Oct 2001 12:24:28 -0700 Received: from 157.54.9.108 by inet-vrs-01.redmond.corp.microsoft.com (InterScan E-Mail VirusWall NT); Mon, 08 Oct 2001 12:24:28 -0700 Received: from red-msg-04.redmond.corp.microsoft.com ([157.54.12.74]) by inet-imc-05.redmond.corp.microsoft.com with Microsoft SMTPSVC(5.0.2195.2966); Mon, 8 Oct 2001 12:24:23 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.5716.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: [Caml-list] Memory mapped values Date: Mon, 8 Oct 2001 12:24:23 -0700 Message-ID: Thread-Topic: Memory mapped values Thread-Index: AcFQHP3T3XE9PgEuTHKj1bwByK0LkgAEBhIg From: "Don Syme" To: X-OriginalArrivalTime: 08 Oct 2001 19:24:23.0525 (UTC) FILETIME=[D62FA950:01C1502E] Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is just a random idea... Would it be possible in theory for "input_value" to work by memory-mapping the file being read, rather than by immediately reading the file? The idea would be that the structured value would then only actually be realised in physical memory as it is touched by execution and the corresponding pages of the memory-mapped file dragged in by the virtual memory mechanism. (To be honest, I haven't actually checked if this is how input_value currently works, though I'm certain it can't be.) This technique would certainly require some modification to the GC, and I'm not even sure if the relocation of internal pointers in the data structure could be made to work (do any memory mapping primitives provide that functionality?). But if it could work, then that could make for one of the very best and easiest ways of persisting data structures - easier than moving to a relational database, and directly related to the programming model. In addition, the layout of data structures on disk could be then be optimized to take into account the access pattern at runtime. With a page-fault costing something in the order of a million cycles these days that could be very valuable... Cheers, Don ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr