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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 738727EE25 for ; Tue, 5 Nov 2013 18:08:26 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jean.krivine@gmail.com) identity=pra; client-ip=209.85.212.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jean.krivine@gmail.com"; x-sender="jean.krivine@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jean.krivine@gmail.com designates 209.85.212.181 as permitted sender) identity=mailfrom; client-ip=209.85.212.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jean.krivine@gmail.com"; x-sender="jean.krivine@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f181.google.com) identity=helo; client-ip=209.85.212.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jean.krivine@gmail.com"; x-sender="postmaster@mail-wi0-f181.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4DAMEleVLRVdS1lGdsb2JhbABZhBLAXAgWDgEBAQEHCwsJEiqCbAEbHgMSCQEGXQERAQUBIogBAQMPnSqDBIxXgwmELQoZJw1kiQEBBQyUAwOYCpAdGCmEUjs X-IPAS-Result: Ag4DAMEleVLRVdS1lGdsb2JhbABZhBLAXAgWDgEBAQEHCwsJEiqCbAEbHgMSCQEGXQERAQUBIogBAQMPnSqDBIxXgwmELQoZJw1kiQEBBQyUAwOYCpAdGCmEUjs X-IronPort-AV: E=Sophos;i="4.93,640,1378850400"; d="scan'208";a="33871078" Received: from mail-wi0-f181.google.com ([209.85.212.181]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Nov 2013 18:08:03 +0100 Received: by mail-wi0-f181.google.com with SMTP id ex4so2409050wid.14 for ; Tue, 05 Nov 2013 09:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=KctYcwhu6bSEOTmBmG3JKrM+w1i70dI05xLHO19iQGw=; b=TOtv+uBbh54+4z26ocYHcHxtuaBJd0AiqBpNNs6pj0+KeiDISjhmLqzLGLkApGcLFO wXAjhNL/u2jOXcyB9DqMsWWJQIdDm1IsgjOplGPh0FSlkejkDUbvEdqKPJwOk9IHXfv8 U7CsxRjtG2R1PCTSeUuMrnX1pPGz6nHlpa+mAIXyXote8/xvpKtt5UqIPfYHXHVt4UqN HuxExQv0Cijvha4PvJcSqtP3WEvlJi9Z56TF/g2enzEEmCoxdwwKGUZgiPWIX1UjwbQw uyTyUfHrPcg/cC39QmUjvEvtuZnyqTrZxK74Vya3X7CPSoA1LuFlLIDKihXLPaWDcV2/ 9iAQ== X-Received: by 10.180.160.212 with SMTP id xm20mr17420470wib.23.1383671282873; Tue, 05 Nov 2013 09:08:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.87.195 with HTTP; Tue, 5 Nov 2013 09:07:42 -0800 (PST) From: Jean Krivine Date: Tue, 5 Nov 2013 18:07:42 +0100 Message-ID: To: caml users Content-Type: multipart/alternative; boundary=047d7b624d344d3f8104ea711352 Subject: [Caml-list] out-of-the-heap 'a arrays ? --047d7b624d344d3f8104ea711352 Content-Type: text/plain; charset=ISO-8859-1 Dear all I am developing a graph rewriting algorithm which operates on large graphs. Because of the large data structure the GC becomes quite inefficient for two reasons that I am inferring: 1/ there is no correlation between the time of allocation of an object and its likelihood to be garbage collected. 2/ even when there is nothing to collect, I guess that the GC is still inspecting the heap. Point 1 is inducing some memory leak and point 2 is just inefficient. I think I took care of point 1 by using my own allocation heap (so there is nothing to collect for the GC). But to take care of point 2 I guess I need to tell the GC that my heap (an extensible array) should not be inspected. As far as I understand there is a module Ancient which I can use to tell the GC to ignore my array but, if I understand well, it would only work if I use my array in a read only fashion. I also thought I could use Bigarray, but it seems it can only be used for basic array types. To summarize my question: is there a (reasonable) way to implement an 'a array out of the ocaml heap ? Thanks! JK --047d7b624d344d3f8104ea711352 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Dear all

I am developing a graph rewrit= ing algorithm which operates on large graphs. Because of the large data str= ucture the GC becomes quite inefficient for two reasons that I am inferring= :=A0
1/ there is no correlation between the time of allocation of an object= and its likelihood to be garbage collected.
2/ even when there i= s nothing to collect, I guess that the GC is still inspecting the heap.

Point 1 is inducing some memory leak and point 2 is jus= t inefficient. I think I took care of point 1 by using my own allocation he= ap (so there is nothing to collect for the GC). But to take care of point 2= I guess I need to tell the GC that my heap (an extensible array) should no= t be inspected.

As far as I understand there is a module Ancient which = I can use to tell the GC to ignore my array but, if I understand well, it w= ould only work if I use my array in a read only fashion.=A0
I als= o thought I could use Bigarray, but it seems it can only be used for basic = array types.

To summarize my question: is there a (reasonable) way t= o implement an 'a array out of the ocaml heap ?=A0

=
Thanks!
JK
--047d7b624d344d3f8104ea711352--