[armedbear-devel] Recovering "special slots" after package deletion
Alessio Stalla
alessiostalla at gmail.com
Mon Jan 10 23:51:04 UTC 2011
On Mon, Jan 10, 2011 at 11:38 PM, Erik Huelsmann <ehuels at gmail.com> wrote:
> The other day, Ville and I were discussing the issue with recovery of
> "special slots" after package deletion on IRC. Let me start by
> describing the problem for you first. After that I'll describe the
> solution I see, however, your feedback on the solution is very much
> appreciated.
[snip very thorough explanation]
> Can you comment? Is my approach as sane as I think it is?
I have no objections on the use of finalize(). The common wisdom is
that finalize() should be avoided, but that's for ordinary code, where
indeed finalize() is most of the time the wrong answer. Our situation
sounds like a typical use case for finalize().
However, I have a concern. I didn't research this at all - I should
really be already in bed sleeping now - but I fear the consequences of
generational garbage collection. Symbols are typically long-lived
objects and likely to end up in the "elder" generation. I don't think
a System.gc() is guaranteed to clean that up, so using it as a mean to
obtain new indexes when all 4096 have been allocated might not work.
Extending the table will do the trick.
Bye,
Alessio
More information about the armedbear-devel
mailing list