Index: trunk/psLib/src/sys/psMemory.h
===================================================================
--- trunk/psLib/src/sys/psMemory.h	(revision 14677)
+++ trunk/psLib/src/sys/psMemory.h	(revision 14982)
@@ -15,6 +15,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.71 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-08-27 23:16:17 $
+ *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-09-22 03:01:08 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -637,4 +637,15 @@
 
 
+// Ensure this is a psLib pointer
+#define PS_ASSERT_PTR(PTR, RVAL) \
+{ \
+    if (PTR && (!psMemIsAlloced(PTR))) { \
+        psError(PS_ERR_MEMORY_CORRUPTION, false, \
+            "Error: Pointer %p is corrupted or not on the PS memory system.", \
+            PTR); \
+        return RVAL; \
+    } \
+}
+
 /// @} end of SysUtils
 
