From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 882A07EE4B for ; Mon, 30 Sep 2013 16:08:55 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.90,1008,1371074400"; d="scan'208";a="34923465" Received: from pouilly.inria.fr (HELO [128.93.8.13]) ([128.93.8.13]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-CAMELLIA256-SHA; 30 Sep 2013 16:08:54 +0200 Message-ID: <524985F7.8020508@ens.fr> Date: Mon, 30 Sep 2013 16:08:55 +0200 From: Jacques-Henri Jourdan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Two questions on the OCAML runtime system and compiler, > > Question 2. > > On a 64-bit system, can we safely get rid of the page table, in > particular > caml_page_table_lookup(), if the header of each block is redesigned to > include > a field indicating which memory area it resides (old heap, young heap, > static > data, etc)? I wonder what other purposes the page table serves, other > than > determining the memory area for a given pointer. The OCaml runtime is designed so that pointers in the heap can point to objects outside the OCaml heap, as long as they are 2-aligned. That is, bindings for C libraries are allowed to return C pointers (eg. allocated using malloc) as OCaml values. However, I do not know how many actual bindings make use of this feature. -- JHJ