Index: /branches/jch-memory/psLib/src/sys/psMemory.c
===================================================================
--- /branches/jch-memory/psLib/src/sys/psMemory.c	(revision 10895)
+++ /branches/jch-memory/psLib/src/sys/psMemory.c	(revision 10896)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.88.2.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-01-03 22:07:23 $
+*  @version $Revision: 1.88.2.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2007-01-03 22:25:33 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -363,8 +363,6 @@
         *(psPtr*)&ptr->endblock = P_PS_MEMMAGIC;
         ptr->userMemorySize = size;
-        if (safeThreads) {
-            pthread_mutex_init(&ptr->refCounterMutex, NULL);
-        }
-    }
+    }
+
     // increment the memory id safely.
     MUTEX_LOCK(&memBlockListMutex);
@@ -561,7 +559,5 @@
     }
 
-    MUTEX_LOCK(&ptr2->refCounterMutex);
     refCount = ptr2->refCounter;
-    MUTEX_UNLOCK(&ptr2->refCounterMutex);
 
     return refCount;
@@ -585,7 +581,5 @@
     }
 
-    MUTEX_LOCK(&ptr->refCounterMutex);
     ptr->refCounter++;
-    MUTEX_UNLOCK(&ptr->refCounterMutex);
 
     // Did the user ask to be informed about this allocation?
@@ -618,7 +612,5 @@
     }
 
-    MUTEX_LOCK(&ptr->refCounterMutex);
     ptr->refCounter = count;
-    MUTEX_UNLOCK(&ptr->refCounterMutex);
 
     if (count < 1) {
@@ -650,13 +642,7 @@
     }
 
-    MUTEX_LOCK(&ptr->refCounterMutex);
-
     if (ptr->refCounter > 1) {
         ptr->refCounter--;                 // multiple references, just decrement the count.
-        MUTEX_UNLOCK(&ptr->refCounterMutex);
-
     } else {
-        MUTEX_UNLOCK(&ptr->refCounterMutex);
-
         if (ptr->freeFunc != NULL) {
             ptr->freeFunc(vptr);
Index: /branches/jch-memory/psLib/src/sys/psMemory.h
===================================================================
--- /branches/jch-memory/psLib/src/sys/psMemory.h	(revision 10895)
+++ /branches/jch-memory/psLib/src/sys/psMemory.h	(revision 10896)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.61.2.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-01-03 03:36:38 $
+ *  @version $Revision: 1.61.2.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-01-03 22:25:33 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -74,5 +74,4 @@
     const char *file;                  ///< set from __FILE__ in e.g. p_psAlloc
     const unsigned int lineno;         ///< set from __LINE__ in e.g. p_psAlloc
-    pthread_mutex_t refCounterMutex;   ///< mutex to ensure exclusive access to reference counter
     psReferenceCount refCounter;       ///< how many times pointer is referenced
     bool persistent;                   ///< marks if this non-user persistent data like error stack, etc.
