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 28EF37FC6B for ; Tue, 6 Oct 2015 15:43:44 +0200 (CEST) IronPort-PHdr: 9a23:Ki/T5B2G1scfMBUxsmDT+DRfVm0co7zxezQtwd8ZsegVL/ad9pjvdHbS+e9qxAeQG96Lt7Qb0qL/iOPJZy8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMzfbSpXNGLx+2MlMmMuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM85fxGdvOE7B102kvpT4r9Zf9HFbsvclsspBSrnSfqIiTLUeAi51HXoy4ZihjxjITQKV6jMjFEBQ2jhPBQXeplmuRJb6sgPzsOxwyCiTe8rsQuZnCnyZ8653RUqw2288PDkj/TSPhw== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=rich@annexia.org; spf=Pass smtp.mailfrom=rich@annexia.org; spf=None smtp.helo=postmaster@furbychan.cocan.org Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rich@annexia.org) identity=pra; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rich@annexia.org designates 80.68.91.176 as permitted sender) identity=mailfrom; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@furbychan.cocan.org) identity=helo; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="postmaster@furbychan.cocan.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BBBQBKzxNW/7BbRFBeg3uqMAUBAQEBAQEFAYENlSwhh2kQAQEBAQEBAQGBCYIdgkh7NAUoiGYBCJsMpBoEhiw+ijKDA4EUBZJNgzcBhReHd5t2OCuBSoI5PYhyAQEB X-IPAS-Result: A0BBBQBKzxNW/7BbRFBeg3uqMAUBAQEBAQEFAYENlSwhh2kQAQEBAQEBAQGBCYIdgkh7NAUoiGYBCJsMpBoEhiw+ijKDA4EUBZJNgzcBhReHd5t2OCuBSoI5PYhyAQEB X-IronPort-AV: E=Sophos;i="5.17,644,1437429600"; d="scan'208";a="181368535" Received: from annexia.org (HELO furbychan.cocan.org) ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 06 Oct 2015 15:43:43 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.84) (envelope-from ) id 1ZjSWs-0005MS-83 for caml-list@inria.fr; Tue, 06 Oct 2015 14:43:42 +0100 Date: Tue, 6 Oct 2015 14:43:42 +0100 From: "Richard W.M. Jones" To: caml-list@inria.fr Message-ID: <20151006134341.GA20503@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [Caml-list] Finding "lost" references to OCaml heap values I guess I have two questions: (1) Is calling Gc.compact () guaranteed to call the finalizer of any object which is no longer reachable, under all circumstances? Or would there be some case where it wouldn't be called? (2) I have a large mixed OCaml / C program[a] where somehow calling Gc.compact isn't calling the destructor of a (very) large object. Manual code inspection has not revealed anything so far -- superficially it appears we are not holding any references to the object. Is there any method / library / tool that can inspect the OCaml heap and find references to an object? Rich. [a] https://github.com/libguestfs/libguestfs/tree/master/v2v -- Richard Jones Red Hat