Author: mladen.turk(a)jboss.com
Date: 2007-10-11 03:55:20 -0400 (Thu, 11 Oct 2007)
New Revision: 1095
Modified:
trunk/sight/native/share/library.c
trunk/sight/test/org/jboss/sight/MemoryLeakTest.java
Log:
Use NESTED thread mutexes
Modified: trunk/sight/native/share/library.c
===================================================================
--- trunk/sight/native/share/library.c 2007-10-11 06:57:32 UTC (rev 1094)
+++ trunk/sight/native/share/library.c 2007-10-11 07:55:20 UTC (rev 1095)
@@ -175,7 +175,7 @@
return JNI_FALSE;
}
if (apr_thread_mutex_create(&sight_global_mutex,
- APR_THREAD_MUTEX_DEFAULT,
+ APR_THREAD_MUTEX_NESTED,
sight_master_pool) != APR_SUCCESS) {
return JNI_FALSE;
}
@@ -216,7 +216,7 @@
}
if (lockable) {
if ((rc = apr_thread_mutex_create(&mutex,
- APR_THREAD_MUTEX_DEFAULT,
+ APR_THREAD_MUTEX_NESTED,
sight_master_pool)) != APR_SUCCESS) {
apr_allocator_destroy(allocator);
*pool = NULL;
Modified: trunk/sight/test/org/jboss/sight/MemoryLeakTest.java
===================================================================
--- trunk/sight/test/org/jboss/sight/MemoryLeakTest.java 2007-10-11 06:57:32 UTC (rev
1094)
+++ trunk/sight/test/org/jboss/sight/MemoryLeakTest.java 2007-10-11 07:55:20 UTC (rev
1095)
@@ -116,7 +116,7 @@
throws Exception
{
- for (int i = 0; i < 500000; i++) {
+ for (int i = 0; i < 500; i++) {
new NativeObjectTestClass();
}
// Library.clear() will force that all native objects
Show replies by date