From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 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 926C9BC69 for ; Thu, 6 Dec 2007 12:04:31 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALNlV0fAXQImh2dsb2JhbACPVQEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.23,261,1194217200"; d="scan'208";a="20044690" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Dec 2007 12:04:31 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id lB6B4SOr005977 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 6 Dec 2007 12:04:31 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALNlV0fU436rmGdsb2JhbACPVQEBAQEHBAQr X-IronPort-AV: E=Sophos;i="4.23,261,1194217200"; d="scan'208";a="20044689" Received: from moutng.kundenserver.de ([212.227.126.171]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Dec 2007 12:04:30 +0100 Received: from [152.78.96.56] (babylon.cip.physik.uni-muenchen.de [141.84.136.30]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1J0EWr3GYB-0001tg; Thu, 06 Dec 2007 12:04:30 +0100 Message-ID: <4757D904.2090502@functionality.de> Date: Thu, 06 Dec 2007 11:12:04 +0000 From: Thomas Fischbacher User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2 X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Questions on replacing finalizers and memory footprints Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/n7lJYcXRNm8HFmYJIubAR8qvVeWM0b6XjB5W 0lTJWQneO/UYtB1V8un+tXkBHZjCr6OI7Nl55onFVIUp/UvQT3 TODz8IXVcs1RbgiFi5KXA== X-Miltered: at discorde with ID 4757D73C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; finalizers:01 footprints:01 finalizer:01 finalizers:01 arrays:01 runtime:01 functions:01 tuples:01 marshal:01 modifying:02 module:03 bytes:03 perhaps:05 problem:05 implement:06 Hello everybody, is there a simple and straightforward way to replace a finalizer function attached to some entity by a different one, or do I have to work around this problem by modifying my finalizers appropriately? Also, is there a simple way to implement a function (perhaps using Obj.magic) which will walk a (possibly circular) network of tuples, arrays, variadic entities and lists, and return the total number of bytes used up by that structure? I see that this should be possible in principle with the present implementation of the runtime if one could get some basic information about the internal type of an array. Actually, the Marshal module will have to do something very similar (but not exactly the same thing). Is there a way to get hold of the underlying functions? -- best regards, Thomas Fischbacher tf@functionality.de