<br><br><div class="gmail_quote">On Thu, May 20, 2010 at 11:13 AM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Joachim,<div><br></div><div> the Behavior>>flushCache method, primitive 89, flushes the entire cache, so its all you need. There are alternative primitives that flush selectively, i.e. Symbol>>flushCache, primitive 119, and CompiledMethod>>flushCache, primitive 116, flush only entries for the receivers.<br>
</div></blockquote><div><br></div><div>And the VM does selectively flush the cache on GC anyway, so you shouldn't have to do anything.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<br></div><div>HTH</div><div>Eliot</div><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Thu, May 20, 2010 at 10:52 AM, Stéphane Ducasse <span dir="ltr"><<a href="mailto:stephane.ducasse@inria.fr" target="_blank">stephane.ducasse@inria.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Begin forwarded message:<br>
<br>
> From: Joachim Geidel <<a href="mailto:joachim.geidel@onlinehome.de" target="_blank">joachim.geidel@onlinehome.de</a>><br>
> Date: May 20, 2010 6:31:51 PM GMT+02:00<br>
> To: <<a href="mailto:pharo-users@lists.gforge.inria.fr" target="_blank">pharo-users@lists.gforge.inria.fr</a>><br>
> Subject: [Pharo-users] Flushing the VM method cache?<br>
> Reply-To: A friendly place where any question about pharo is welcome <<a href="mailto:pharo-users@lists.gforge.inria.fr" target="_blank">pharo-users@lists.gforge.inria.fr</a>><br>
><br>
> Hello all,<br>
><br>
> The software I am working on generates classes on the fly, and discards<br>
> those classes when they are no longer needed. The class library is<br>
> cross-platform, i.e. it exists for Dolphin and VisualWorks, and I am<br>
> currently porting it to Pharo.<br>
><br>
> In Dolphin, it is necessary to flush the VM's method cache after discarding<br>
> all the dynamically generated classes, because the method cache holds<br>
> references to the classes which prevent them from being garbage collected.<br>
> For VisualWorks, I have adopted this, although I am not quite sure if it's<br>
> actually needed there.<br>
><br>
> In the Pharo 1.0 image, I haven't found a method for flushing the VM's<br>
> method cache in one go, there only seems to be Behavior>>flushCache.<br>
><br>
> What I would like to know is:<br>
> - Does the VM method cache of the Squeak VM hold references to classes which<br>
> prevent an obsolete class from being garbage collected? If this is not the<br>
> case, I don't need to flush anything.<br>
> - If flushing the cache is advisable, is Behavior>>flushCache the only way<br>
> to do this? I would have to pick up all the obsolete classes and iterate<br>
> over them in that case.<br>
><br>
> Thanks in advance!<br>
> Joachim Geidel<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Pharo-users mailing list<br>
> <a href="mailto:Pharo-users@lists.gforge.inria.fr" target="_blank">Pharo-users@lists.gforge.inria.fr</a><br>
> <a href="http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users" target="_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users</a><br>
<br>
<br>
_______________________________________________<br>
Pharo-project mailing list<br>
<a href="mailto:Pharo-project@lists.gforge.inria.fr" target="_blank">Pharo-project@lists.gforge.inria.fr</a><br>
<a href="http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project" target="_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>