Index: trunk/psLib/src/sys/psMemory.c
===================================================================
--- trunk/psLib/src/sys/psMemory.c	(revision 8812)
+++ trunk/psLib/src/sys/psMemory.c	(revision 9538)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-09-14 22:27:29 $
+*  @version $Revision: 1.86 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-10-13 21:13:48 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -24,4 +24,5 @@
 #include "psMemory.h"
 #include "psError.h"
+#include "psAssert.h"
 #include "psAbort.h"
 #include "psLogMsg.h"
@@ -35,6 +36,4 @@
 #include "psLine.h"
 #include "psRegion.h"
-
-#define P_PS_MEMMAGIC (psPtr )0xdeadbeef   // Magic number in psMemBlock header
 
 #define P_PS_LARGE_BLOCK_SIZE 65536        // size where under, we try to recycle
@@ -274,17 +273,5 @@
 psMemId psMemGetId(void)
 {
-    psMemId id;
-
-    if (safeThreads) {
-        pthread_mutex_lock(&memIdMutex);
-    }
-
-    id = memid + 1;
-
-    if (safeThreads) {
-        pthread_mutex_unlock(&memIdMutex);
-    }
-
-    return id;
+    return psMemGetLastId() + 1;
 }
 
@@ -889,23 +876,8 @@
 }
 
-bool is_psType(psPtr ptr)
-{
-    if (ptr == NULL) {
-        return false;
-    }
-    psMemBlock* m = ((psMemBlock* ) ptr) - 1;
-    if (m->startblock != P_PS_MEMMAGIC || m->endblock != P_PS_MEMMAGIC) {
-        return false; //Probably not a psAllocated-Type
-    } else {
-        return true;
-    }
-}
-
 bool psMemCheckType(psDataType type,
                     psPtr ptr)
 {
-    if (!is_psType(ptr)) {
-        return false;
-    }
+    PS_ASSERT_PTR(ptr, false);
 
     switch(type) {
