<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Georgia">David,<br>
      <br>
      While I was a little suspicious about the close placement of the
      init and test, my observation was from a 4.2 image with no changes
      in this area. Just curious what image/vm implements this *new*
      finalization.<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
      <br>
    </font><br>
    On 12/23/11 10:13 AM, David T. Lewis wrote:
    <blockquote cite="mid:20111223151318.GA83575@shell.msen.com"
      type="cite">
      <pre wrap="">On Fri, Dec 23, 2011 at 07:39:41AM -0500, Bob Arning wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">I've seen suspicious behavior (tough time interrupting and lots of 
finalization in MessageTally reports) in my 4.2 image, so I thought I'd 
look at applying this fix. One thing I'm a little puzzled about: 
HasNewFinalization is false in my image (I'm using a Cog that's a few 
months old). Under what conditions is it true?
</pre>
      </blockquote>
      <pre wrap="">
I think you have spotted a timing problem here. I put the initTestPair
and checkTestPair calls together in a startUp: method, which is
wrong because it does not give the VM an opportunity to do its
updates, so the results of the test are not valid.

This is not exactly elegant, but if you force a garbage collection
between initTestPair and checkTestPair, the test will work properly.

WeakArray class&gt;&gt;startUp: resuming
        resuming ifFalse: [ ^self ].
        "Check if new finalization is supported by the VM"
        WeakFinalizationList initTestPair.
        Smalltalk garbageCollect.
        WeakFinalizationList checkTestPair.
        self restartFinalizationProcess.

A better fix is needed - sorry about that. I'm not sure if I'll
have a chance to look at this today, but the important thing is
to arrange for the check to be done when the image is started,
but not to continue repeating the test after it has been
successfully performed.

Dave



</pre>
    </blockquote>
  </body>
</html>