[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
memory allocation, finalization, jni code and locks (Was: [cp-patches] r
From: |
Mark Wielaard |
Subject: |
memory allocation, finalization, jni code and locks (Was: [cp-patches] remove JamVM workarounds from GTK peers) |
Date: |
Thu, 18 Aug 2005 23:26:09 +0200 |
Hi,
Moving the the main classpath list as a FYI for all runtime developers.
They probably know, but since we are now relying on this lets explicitly
say so.
On Wed, 2005-08-17 at 23:16 -0400, Thomas Fitzsimmons wrote:
> I'm removing these workarounds for a JamVM deadlock problem that was
> fixed in jamvm-1.3.2.
>
> - /* Must release the GDK lock before allocating memory through the
> - JVM, since some JVMs use the same lock for allocations and
> - finalization. Deadlock can occur on those JVMs. */
> - gdk_threads_leave ();
> -
> result_array = (*env)->NewIntArray (env, (width * height));
> -
> - gdk_threads_enter ();
When memory allocation happens, even when called from JNI, finalization
should not happen on a thread that might hold a user visible lock, even
if it is a non-java lock. So garbage collection collection can occur on
any arbitrary thread, but running finalizers cannot.
Cheers,
Mark
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- memory allocation, finalization, jni code and locks (Was: [cp-patches] remove JamVM workarounds from GTK peers),
Mark Wielaard <=