Index: trunk/psLib/src/sysUtils/psMemory.h
===================================================================
--- trunk/psLib/src/sysUtils/psMemory.h	(revision 1606)
+++ trunk/psLib/src/sysUtils/psMemory.h	(revision 1810)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-23 22:36:03 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 23:48:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -73,4 +73,5 @@
     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.
     const void *endblock;              ///< initialised to p_psMEMMAGIC
 }
@@ -163,4 +164,33 @@
     void *ptr                          ///< the memory block
 );
+
+/** Set the memory as persistent so that it is ignored when detecting memory leaks.
+ *
+ *  Used to mark a memory block as persistent data within the library, 
+ *  i.e., non user-level data used to hold psLib's state or cache data.  Such
+ *  examples of this class of memory is psTrace's trace-levels and dynamic
+ *  error codes.
+ *
+ *  Memory marked as persistent is excluded from memory leak checks.
+ *
+ */
+void p_psMemSetPersistent(
+    void *ptr,                         ///< the memory block to operate on
+    bool value                         ///< true if memory is persistent, otherwise false
+);
+
+/** Get the memory's persistent flag.
+ *
+ *  Checks if a memory block has been marked as persistent by 
+ *  p_psMemSetPresistent.
+ *
+ *  Memory marked as persistent is excluded from memory leak checks.
+ *
+ *  @return bool    true if memory is marked persistent, otherwise false.
+ */
+bool p_psMemGetPersistent(
+    void *ptr                          ///< the memory block to check.
+);
+
 
 /** Memory re-allocation.  This operates much like realloc(), but is guaranteed to return a non-NULL value.
