Index: /trunk/psLib/src/sys/psMemory.c
===================================================================
--- /trunk/psLib/src/sys/psMemory.c	(revision 1820)
+++ /trunk/psLib/src/sys/psMemory.c	(revision 1821)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-14 23:48:25 $
+*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-16 23:51:07 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -261,10 +261,14 @@
 {
     int nbad = 0;               // number of bad blocks
+    bool failure = false;
 
     // get exclusive access to the memBlock list to avoid it changing on us while we use it.
-    pthread_mutex_lock(&memBlockListMutex);
+    //    pthread_mutex_lock(&memBlockListMutex);
 
     for (psMemBlock* iter = lastMemBlockAllocated; iter != NULL; iter = iter->nextBlock) {
-        if (checkMemBlock(iter, __func__)) {
+        pthread_mutex_unlock(&memBlockListMutex);
+        failure = checkMemBlock(iter, __func__);
+        pthread_mutex_lock(&memBlockListMutex);
+        if ( failure ) {
             nbad++;
 
Index: /trunk/psLib/src/sysUtils/psMemory.c
===================================================================
--- /trunk/psLib/src/sysUtils/psMemory.c	(revision 1820)
+++ /trunk/psLib/src/sysUtils/psMemory.c	(revision 1821)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-14 23:48:25 $
+*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-16 23:51:07 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -261,10 +261,14 @@
 {
     int nbad = 0;               // number of bad blocks
+    bool failure = false;
 
     // get exclusive access to the memBlock list to avoid it changing on us while we use it.
-    pthread_mutex_lock(&memBlockListMutex);
+    //    pthread_mutex_lock(&memBlockListMutex);
 
     for (psMemBlock* iter = lastMemBlockAllocated; iter != NULL; iter = iter->nextBlock) {
-        if (checkMemBlock(iter, __func__)) {
+        pthread_mutex_unlock(&memBlockListMutex);
+        failure = checkMemBlock(iter, __func__);
+        pthread_mutex_lock(&memBlockListMutex);
+        if ( failure ) {
             nbad++;
 
