public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: "Sylvain Marié" <sylvainmarie2@yahoo.fr>
Cc: java@gcc.gnu.org, mark@klomp.org
Subject: Re: [GCJ-core] dynamically unloading native libraries
Date: Wed, 05 Nov 2008 11:08:00 -0000	[thread overview]
Message-ID: <49117E7B.70104@redhat.com> (raw)
In-Reply-To: <486895.21159.qm@web28503.mail.ukl.yahoo.com>

Sylvain Marié wrote:

> Thank you for putting the topic back on the table,
> 
>> We seem to never even call JNI_OnUnload on the jni libraries.
> 
> That's exactly my point - and also even libraries that do not contain JNI at all
> (simple .so without any relation to java - I know it is not a very useful case but it is
> very simple to test with a dummy .so).
> 
> But the root cause of the problem is a bit more complex: 
> 
> a) As you mentioned, ClassLoaders don't unload unused native libraries when they are finalized.
> 
> but also
> 
> b) ClassLoaders don't even seem to be finalized when they are not used any more.
> (no alive instances, etc.)
> 
> So even correcting a) would not help, we should first try to understand why 
> ClassLoaders are never gc'ed.

Yes.  I can't think of any immediate reason why they aren't: it's a matter
worth investigating.



Andrew.

  reply	other threads:[~2008-11-05 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05 10:45 Sylvain Marié
2008-11-05 11:08 ` Andrew Haley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-07 12:29 Sylvain Marié
2008-10-07 12:42 ` Andrew Haley
2008-11-02 17:43   ` Mark Wielaard
2008-11-03 10:46     ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49117E7B.70104@redhat.com \
    --to=aph@redhat.com \
    --cc=java@gcc.gnu.org \
    --cc=mark@klomp.org \
    --cc=sylvainmarie2@yahoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).