Index: trunk/psLib/src/sys/psMemory.h
===================================================================
--- trunk/psLib/src/sys/psMemory.h	(revision 1810)
+++ trunk/psLib/src/sys/psMemory.h	(revision 2204)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-14 23:48:25 $
+ *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -22,6 +22,7 @@
 
 #include <stdio.h>                     // needed for FILE
-#include <stdbool.h>
 #include <pthread.h>                   // we need a mutex to make this stuff thread safe.
+
+#include "psType.h"
 
 /** @addtogroup MemoryManagement
@@ -48,11 +49,11 @@
 
 /// typedef for memory identification numbers.  Guaranteed to be some variety of integer.
-typedef unsigned long psMemoryId;
+typedef psU64 psMemoryId;
 
 /// typedef for a memory block's reference count. Guaranteed to be some variety of integer.
-typedef unsigned long psReferenceCount;
+typedef psU64 psReferenceCount;
 
 /// typedef for deallocator.
-typedef void (*psFreeFcn) (void *ptr);
+typedef void (*psFreeFcn) (psPtr ptr);
 
 /** Book-keeping data for storage allocator.
@@ -63,5 +64,5 @@
 typedef struct psMemBlock
 {
-    const void *startblock;            ///< initialised to p_psMEMMAGIC
+    const psPtr startblock;            ///< initialised to p_psMEMMAGIC
     struct psMemBlock* previousBlock;  ///< previous block in allocation list
     struct psMemBlock* nextBlock;      ///< next block allocation list
@@ -70,9 +71,9 @@
     const psMemoryId id;               ///< a unique ID for this allocation
     const char *file;                  ///< set from __FILE__ in e.g. p_psAlloc
-    const int lineno;                  ///< set from __LINE__ in e.g. p_psAlloc
+    const psS32 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.
-    const void *endblock;              ///< initialised to p_psMEMMAGIC
+    psBool persistent;                   ///< marks if this non-user persistent data like error stack, etc.
+    const psPtr endblock;              ///< initialised to p_psMEMMAGIC
 }
 psMemBlock;
@@ -106,10 +107,10 @@
     const psMemBlock* ptr,             ///< the pointer to the problematic memory block.
     const char *file,                  ///< the file in which the problem originated
-    int lineno                         ///< the line number in which the problem originated
+    psS32 lineno                         ///< the line number in which the problem originated
 );
 
 /** prototype of a callback function used when memory runs out
  *
- *  @return void* pointer to requested buffer of the size size_t, or NULL if memory could not
+ *  @return psPtr pointer to requested buffer of the size size_t, or NULL if memory could not
  *          be found.
  *
@@ -117,5 +118,5 @@
  *  @ingroup memCallback
  */
-typedef void *(*psMemExhaustedCallback) (
+typedef psPtr (*psMemExhaustedCallback) (
     size_t size                        ///< the size of buffer required
 );
@@ -123,15 +124,15 @@
 /** Memory allocation.  This operates much like malloc(), but is guaranteed to return a non-NULL value.
  *
- *  @return void* pointer to the allocated buffer. This will not be NULL.
+ *  @return psPtr pointer to the allocated buffer. This will not be NULL.
  *  @see psFree 
  */
 #ifdef DOXYGEN
-void *psAlloc(size_t size       ///< Size required
+psPtr psAlloc(size_t size       ///< Size required
              );
 #else
 
-void *p_psAlloc(size_t size,    ///< Size required
+psPtr p_psAlloc(size_t size,    ///< Size required
                 const char *file,       ///< File of call
-                int lineno      ///< Line number of call
+                psS32 lineno      ///< Line number of call
                );
 
@@ -148,5 +149,5 @@
  */
 void p_psMemSetDeallocator(
-    void *ptr,                         ///< the memory block to operate on
+    psPtr ptr,                         ///< the memory block to operate on
     psFreeFcn freeFcn                  ///< the function to be executed at deallocation
 );
@@ -162,5 +163,5 @@
  */
 psFreeFcn p_psMemGetDeallocator(
-    void *ptr                          ///< the memory block
+    psPtr ptr                          ///< the memory block
 );
 
@@ -176,6 +177,6 @@
  */
 void p_psMemSetPersistent(
-    void *ptr,                         ///< the memory block to operate on
-    bool value                         ///< true if memory is persistent, otherwise false
+    psPtr ptr,                         ///< the memory block to operate on
+    psBool value                         ///< true if memory is persistent, otherwise false
 );
 
@@ -187,8 +188,8 @@
  *  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.
+ *  @return psBool    true if memory is marked persistent, otherwise false.
+ */
+psBool p_psMemGetPersistent(
+    psPtr ptr                          ///< the memory block to check.
 );
 
@@ -196,19 +197,19 @@
 /** Memory re-allocation.  This operates much like realloc(), but is guaranteed to return a non-NULL value.
  *
- *  @return void* pointer to resized buffer. This will not be NULL.
+ *  @return psPtr pointer to resized buffer. This will not be NULL.
  *  @see psAlloc, psFree
  */
 #ifdef DOXYGEN
-void *psRealloc(
-    void *ptr                          ///< Pointer to re-allocate
+psPtr psRealloc(
+    psPtr ptr                          ///< Pointer to re-allocate
     size_t size,                       ///< Size required
 );
 #else
 
-void *p_psRealloc(
-    void *ptr,                         ///< Pointer to re-allocate
+psPtr p_psRealloc(
+    psPtr ptr,                         ///< Pointer to re-allocate
     size_t size,                       ///< Size required
     const char *file,                  ///< File of call
-    int lineno                         ///< Line number of call
+    psS32 lineno                         ///< Line number of call
 );
 
@@ -224,12 +225,12 @@
 #ifdef DOXYGEN
 void psFree(
-    void *ptr,                         ///< Pointer to free, if NULL, function returns immediately.
+    psPtr ptr,                         ///< Pointer to free, if NULL, function returns immediately.
 );
 #else
 
 void p_psFree(
-    void *ptr,                        ///< Pointer to free
+    psPtr ptr,                        ///< Pointer to free
     const char *file,                 ///< File of call
-    int lineno                        ///< Line number of call
+    psS32 lineno                        ///< Line number of call
 );
 
@@ -248,10 +249,10 @@
  *  If memory leaks are found, the Memory Problem callback will be called as well.
  *
- *  return int  number of memory blocks found as 'leaks', i.e., the number of currently allocated memory
+ *  return psS32  number of memory blocks found as 'leaks', i.e., the number of currently allocated memory
  *              blocks above id0 that have not been freed.
  *  @see psAlloc, psFree, psgetMemId, psMemProblemCallbackSet
  *  @ingroup memTracing
  */
-int psMemCheckLeaks(
+psS32 psMemCheckLeaks(
     psMemoryId id0,                    ///< don't list blocks with id < id0
     psMemBlock* ** arr,                ///< pointer to array of pointers to leaked blocks, or NULL
@@ -264,6 +265,6 @@
  *  @ingroup memTracing
  */
-int psMemCheckCorruption(
-    bool abort_on_error                ///< Abort on detecting corruption?
+psS32 psMemCheckCorruption(
+    psBool abort_on_error                ///< Abort on detecting corruption?
 );
 
@@ -273,5 +274,5 @@
  */
 psReferenceCount psMemGetRefCounter(
-    void *vptr                         ///< Pointer to get refCounter for
+    psPtr vptr                         ///< Pointer to get refCounter for
 );
 
@@ -281,13 +282,13 @@
  */
 #ifdef DOXYGEN
-void *psMemIncrRefCounter(
-    void *vptr                         ///< Pointer to increment refCounter, and return
-);
-#else
-
-void *p_psMemIncrRefCounter(
-    void *vptr,                        ///< Pointer to increment refCounter, and return
+psPtr psMemIncrRefCounter(
+    psPtr vptr                         ///< Pointer to increment refCounter, and return
+);
+#else
+
+psPtr p_psMemIncrRefCounter(
+    psPtr vptr,                        ///< Pointer to increment refCounter, and return
     const char *file,                  ///< File of call
-    int lineno                         ///< Line number of call
+    psS32 lineno                         ///< Line number of call
 );
 
@@ -299,17 +300,17 @@
  *  @ingroup memRefCount
  *
- *  @return void*    the pointer deremented in refCount, or NULL if pointer is 
+ *  @return psPtr    the pointer deremented in refCount, or NULL if pointer is 
  *                   fully dereferenced.
  */
 #ifdef DOXYGEN
-void* psMemDecrRefCounter(
-    void* vptr                         ///< Pointer to decrement refCounter, and return
-);
-#else
-
-void *p_psMemDecrRefCounter(
-    void *vptr,                        ///< Pointer to decrement refCounter, and return
+psPtr psMemDecrRefCounter(
+    psPtr vptr                         ///< Pointer to decrement refCounter, and return
+);
+#else
+
+psPtr p_psMemDecrRefCounter(
+    psPtr vptr,                        ///< Pointer to decrement refCounter, and return
     const char *file,                  ///< File of call
-    int lineno                         ///< Line number of call
+    psS32 lineno                         ///< Line number of call
 );
 
