Index: /trunk/psLib/src/astro/psCoord.c
===================================================================
--- /trunk/psLib/src/astro/psCoord.c	(revision 4897)
+++ /trunk/psLib/src/astro/psCoord.c	(revision 4898)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.83 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-23 23:23:05 $
+*  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:10 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -219,4 +219,25 @@
 }
 
+
+bool psMemCheckPlane(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)planeFree );
+}
+
+bool psMemCheckSphere(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)sphereFree );
+}
+
+bool psMemCheckCube(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)cubeFree );
+}
+
+bool psMemCheckPlaneTransform(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)planeTransformFree );
+}
+
 psPlane* psPlaneTransformApply(psPlane* out,
                                const psPlaneTransform* transform,
@@ -267,4 +288,11 @@
     return(pt);
 }
+
+bool psMemCheckPlaneDistort(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)planeDistortFree );
+}
+
+
 
 /******************************************************************************
@@ -343,4 +371,11 @@
     return(p);
 }
+
+bool psMemCheckProjection(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)projectionFree );
+}
+
+
 
 psPlane* psProject(const psSphere* coord,
Index: /trunk/psLib/src/astro/psCoord.h
===================================================================
--- /trunk/psLib/src/astro/psCoord.h	(revision 4897)
+++ /trunk/psLib/src/astro/psCoord.h	(revision 4898)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-25 23:42:01 $
+*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:10 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -219,4 +219,65 @@
 );
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPlane structure, false otherwise.
+ */
+bool psMemCheckPlane(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psSphere structure, false otherwise.
+ */
+bool psMemCheckSphere(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psCube structure, false otherwise.
+ */
+bool psMemCheckCube(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPlaneTransform structure, false otherwise.
+ */
+bool psMemCheckPlaneTransform(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPlaneDistort structure, false otherwise.
+ */
+bool psMemCheckPlaneDistort(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psProjection structure, false otherwise.
+ */
+bool psMemCheckProjection(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Projects a spherical coordinate to a linear coordinate system
  *
Index: /trunk/psLib/src/astro/psSphereOps.c
===================================================================
--- /trunk/psLib/src/astro/psSphereOps.c	(revision 4897)
+++ /trunk/psLib/src/astro/psSphereOps.c	(revision 4898)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-05 01:40:45 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -33,4 +33,8 @@
 #define JULIAN_CENTURY 36525.0
 
+static void sphereRotFree(psSphereRot *result)
+{
+    // There are non dynamic allocated items
+}
 
 psSphereRot* psSphereRotAlloc(double alphaP,
@@ -58,8 +62,15 @@
     // calculate t*s*r.
     psSphereRot* result = psSphereRotCombine(NULL,&t,&s);
+    psMemSetDeallocator(result, (psFreeFunc)sphereRotFree);
     psSphereRotCombine(result,result,&r);
 
     return result;
 }
+
+bool psMemCheckSphereRot(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)sphereRotFree );
+}
+
 
 psSphereRot* psSphereRotQuat(double q0,
Index: /trunk/psLib/src/astro/psSphereOps.h
===================================================================
--- /trunk/psLib/src/astro/psSphereOps.h	(revision 4897)
+++ /trunk/psLib/src/astro/psSphereOps.h	(revision 4898)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-05 01:40:45 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -72,4 +72,16 @@
 );
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psSphereRot structure, false otherwise.
+ */
+bool psMemCheckSphereRot(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Allocator for psSphereRot given quaternions.
  *
Index: /trunk/psLib/src/astro/psTime.c
===================================================================
--- /trunk/psLib/src/astro/psTime.c	(revision 4897)
+++ /trunk/psLib/src/astro/psTime.c	(revision 4898)
@@ -10,6 +10,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-12 19:12:00 $
+ *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -434,4 +434,9 @@
 }
 
+static void timeFree(psTime *outTime)
+{
+    // There are non dynamic allocated items
+}
+
 psTime* psTimeAlloc(psTimeType type)
 {
@@ -449,5 +454,5 @@
     // Allocate memory for structure
     outTime = (psTime*)psAlloc(sizeof(psTime));
-
+    psMemSetDeallocator(outTime, (psFreeFunc)timeFree);
     // Initialize members
     outTime->sec = 0;
@@ -458,4 +463,11 @@
     return outTime;
 }
+
+
+bool psMemCheckTime(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)timeFree );
+}
+
 
 psTime* psTimeGetNow(psTimeType type)
Index: /trunk/psLib/src/astro/psTime.h
===================================================================
--- /trunk/psLib/src/astro/psTime.h	(revision 4897)
+++ /trunk/psLib/src/astro/psTime.h	(revision 4898)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-21 02:39:57 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -100,4 +100,16 @@
 );
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psTime structure, false otherwise.
+ */
+bool psMemCheckTime(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Get current time.
  *
Index: /trunk/psLib/src/fits/psFits.c
===================================================================
--- /trunk/psLib/src/fits/psFits.c	(revision 4897)
+++ /trunk/psLib/src/fits/psFits.c	(revision 4898)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-27 01:33:41 $
+ *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -253,4 +253,11 @@
     return fits;
 }
+
+
+bool psMemCheckFits(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)fitsFree );
+}
+
 
 bool psFitsMoveExtName(const psFits* fits,
Index: /trunk/psLib/src/fits/psFits.h
===================================================================
--- /trunk/psLib/src/fits/psFits.h	(revision 4897)
+++ /trunk/psLib/src/fits/psFits.h	(revision 4898)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-22 03:00:27 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -62,4 +62,15 @@
 );
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psFits structure, false otherwise.
+ */
+bool psMemCheckFits(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Moves the FITS HDU to the specified extension name.
  *
Index: /trunk/psLib/src/imageops/psImageConvolve.c
===================================================================
--- /trunk/psLib/src/imageops/psImageConvolve.c	(revision 4897)
+++ /trunk/psLib/src/imageops/psImageConvolve.c	(revision 4898)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-18 21:44:40 $
+ *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -86,4 +86,11 @@
     }
 }
+
+
+bool psMemCheckKernel(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)freeKernel );
+}
+
 
 psKernel* psKernelGenerate(const psVector* tShifts,
Index: /trunk/psLib/src/imageops/psImageConvolve.h
===================================================================
--- /trunk/psLib/src/imageops/psImageConvolve.h	(revision 4897)
+++ /trunk/psLib/src/imageops/psImageConvolve.h	(revision 4898)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-18 21:44:40 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -77,4 +77,15 @@
 );
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psKernel structure, false otherwise.
+ */
+bool psMemCheckKernel(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Generates a kernel given a list of shift values
  *
Index: /trunk/psLib/src/math/psFunctions.c
===================================================================
--- /trunk/psLib/src/math/psFunctions.c	(revision 4897)
+++ /trunk/psLib/src/math/psFunctions.c	(revision 4898)
@@ -7,6 +7,6 @@
 *  polynomials.  It also contains a Gaussian functions.
 *
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-25 22:52:29 $
+*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -871,4 +871,31 @@
     return(newPoly);
 }
+
+
+bool psMemCheckPolynomial1D(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial1DFree );
+}
+
+bool psMemCheckPolynomial2D(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial2DFree );
+}
+
+bool psMemCheckPolynomial3D(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial3DFree );
+}
+
+bool psMemCheckPolynomial4D(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial4DFree );
+}
+
+bool psMemCheckSpline1D(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)spline1DFree );
+}
+
 
 psF64 psPolynomial1DEval(const psPolynomial1D* poly, psF64 x)
Index: /trunk/psLib/src/math/psFunctions.h
===================================================================
--- /trunk/psLib/src/math/psFunctions.h	(revision 4897)
+++ /trunk/psLib/src/math/psFunctions.h	(revision 4898)
@@ -12,6 +12,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-20 01:21:13 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -163,4 +163,56 @@
 );
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPolynomial1D structure, false otherwise.
+ */
+bool psMemCheckPolynomial1D(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPolynomial2D structure, false otherwise.
+ */
+bool psMemCheckPolynomial2D(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPolynomial3D structure, false otherwise.
+ */
+bool psMemCheckPolynomial3D(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPolynomial4D structure, false otherwise.
+ */
+bool psMemCheckPolynomial4D(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psSpline1D structure, false otherwise.
+ */
+bool psMemCheckSpline1D(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
+
 /** Evaluates a 1-D polynomial at specific coordinates.
  *
Index: /trunk/psLib/src/math/psMinimize.c
===================================================================
--- /trunk/psLib/src/math/psMinimize.c	(revision 4897)
+++ /trunk/psLib/src/math/psMinimize.c	(revision 4898)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.131 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-24 01:04:37 $
+ *  @version $Revision: 1.132 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1372,5 +1372,8 @@
 }
 
-
+static void minimizationFree(psMinimization *min)
+{
+    // There are non dynamic allocated items
+}
 
 /******************************************************************************
@@ -1382,4 +1385,5 @@
 
     psMinimization *min = psAlloc(sizeof(psMinimization));
+    psMemSetDeallocator(min, (psFreeFunc)minimizationFree);
     *(int*)&min->maxIter = maxIter;
     *(float*)&min->tol = tol;
@@ -1390,4 +1394,10 @@
     return(min);
 }
+
+bool psMemCheckMinimization(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)minimizationFree );
+}
+
 
 // This macro takes as input the vector BASE and adds a multiple of the vector
Index: /trunk/psLib/src/math/psMinimize.h
===================================================================
--- /trunk/psLib/src/math/psMinimize.h	(revision 4897)
+++ /trunk/psLib/src/math/psMinimize.h	(revision 4898)
@@ -8,6 +8,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-11 23:04:32 $
+ *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -60,4 +60,15 @@
 );
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psMinimization structure, false otherwise.
+ */
+bool psMemCheckMinimization(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Derive a polynomial fit.
  *
Index: /trunk/psLib/src/math/psStats.c
===================================================================
--- /trunk/psLib/src/math/psStats.c	(revision 4897)
+++ /trunk/psLib/src/math/psStats.c	(revision 4898)
@@ -14,6 +14,6 @@
  *      stats->binsize
  *
- *  @version $Revision: 1.138 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-27 19:55:16 $
+ *  @version $Revision: 1.139 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1753,4 +1753,9 @@
 static void histogramFree(psHistogram* myHist);
 
+static void statsFree(psStats *newStruct)
+{
+    // There are non dynamic allocated items
+}
+
 /******************************************************************************
     psStatsAlloc(): This routine must create a new psStats data structure.
@@ -1761,4 +1766,5 @@
 
     newStruct = (psStats* ) psAlloc(sizeof(psStats));
+    psMemSetDeallocator(newStruct, (psFreeFunc)statsFree);
     newStruct->sampleMean = NAN;
     newStruct->sampleMedian = NAN;
@@ -1787,4 +1793,12 @@
 }
 
+
+bool psMemCheckStats(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)statsFree );
+}
+
+
+
 /******************************************************************************
 psHistogramAlloc(lower, upper, n): allocate a uniform histogram structure
@@ -1885,4 +1899,12 @@
     psFree(myHist->nums);
 }
+
+
+bool psMemCheckHistogram(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)histogramFree );
+}
+
+
 
 /*****************************************************************************
Index: /trunk/psLib/src/math/psStats.h
===================================================================
--- /trunk/psLib/src/math/psStats.h	(revision 4897)
+++ /trunk/psLib/src/math/psStats.h	(revision 4898)
@@ -14,6 +14,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-23 23:23:05 $
+ *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -105,4 +105,16 @@
 );
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psStats structure, false otherwise.
+ */
+bool psMemCheckStats(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /******************************************************************************
     Histogram functions and data structures.
@@ -140,4 +152,16 @@
 );
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psHistogram structure, false otherwise.
+ */
+bool psMemCheckHistogram(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Allocator for psHistogram where the bounds of the bins are explicitly
  *  specified.
Index: /trunk/psLib/src/mathtypes/psImage.c
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.c	(revision 4897)
+++ /trunk/psLib/src/mathtypes/psImage.c	(revision 4898)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-26 23:01:17 $
+ *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -90,4 +90,11 @@
     return image;
 }
+
+
+bool psMemCheckImage(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)imageFree );
+}
+
 
 psRegion psRegionSet(float x0,
Index: /trunk/psLib/src/mathtypes/psImage.h
===================================================================
--- /trunk/psLib/src/mathtypes/psImage.h	(revision 4897)
+++ /trunk/psLib/src/mathtypes/psImage.h	(revision 4898)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-26 03:35:02 $
+ *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -111,4 +111,16 @@
 ;
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psImage structure, false otherwise.
+ */
+bool psMemCheckImage(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Create a psRegion with the specified attributes.
  *
Index: /trunk/psLib/src/mathtypes/psScalar.c
===================================================================
--- /trunk/psLib/src/mathtypes/psScalar.c	(revision 4897)
+++ /trunk/psLib/src/mathtypes/psScalar.c	(revision 4898)
@@ -8,6 +8,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-12 19:12:01 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -22,4 +22,9 @@
 #include "psErrorText.h"
 
+static void scalarFree(psScalar *scalar)
+{
+    // There are non dynamic allocated items
+}
+
 psScalar* psScalarAlloc(complex value, psElemType type)
 {
@@ -28,5 +33,5 @@
     // Create scalar
     scalar = (psScalar* ) psAlloc(sizeof(psScalar));
-
+    psMemSetDeallocator(scalar, (psFreeFunc)scalarFree);
     scalar->type.dimen = PS_DIMEN_SCALAR;
     scalar->type.type = type;
@@ -79,4 +84,11 @@
     return scalar;
 }
+
+
+bool psMemCheckScalar(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)scalarFree );
+}
+
 
 psScalar* psScalarCopy(const psScalar *value)
Index: /trunk/psLib/src/mathtypes/psScalar.h
===================================================================
--- /trunk/psLib/src/mathtypes/psScalar.h	(revision 4897)
+++ /trunk/psLib/src/mathtypes/psScalar.h	(revision 4898)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-12 19:12:01 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -70,4 +70,16 @@
 );
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psScalar structure, false otherwise.
+ */
+bool psMemCheckScalar(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Copy a scalar.
  *
Index: /trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.c	(revision 4897)
+++ /trunk/psLib/src/mathtypes/psVector.c	(revision 4898)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-26 23:01:17 $
+*  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -60,4 +60,9 @@
 
 // FUNCTION IMPLEMENTATION - PUBLIC
+bool psMemCheckVector(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)vectorFree );
+}
+
 
 psVector* psVectorAlloc(long nalloc,
Index: /trunk/psLib/src/mathtypes/psVector.h
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.h	(revision 4897)
+++ /trunk/psLib/src/mathtypes/psVector.h	(revision 4898)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-26 23:01:17 $
+ *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -61,4 +61,14 @@
 /*****************************************************************************/
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psVector structure, false otherwise.
+ */
+bool psMemCheckVector(
+    psPtr ptr                          ///< the pointer whose type to check
+)
+;
 
 /** Allocate a vector.
@@ -72,6 +82,5 @@
     long nalloc,                       ///< Total number of elements to make available.
     psElemType type                    ///< Type of data to be held by vector.
-)
-;
+);
 
 /** Reallocate a vector.
Index: /trunk/psLib/src/sys/psMemory.c
===================================================================
--- /trunk/psLib/src/sys/psMemory.c	(revision 4897)
+++ /trunk/psLib/src/sys/psMemory.c	(revision 4898)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-25 23:42:07 $
+*  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -24,4 +24,25 @@
 #include "psAbort.h"
 #include "psLogMsg.h"
+
+#include "psBitSet.h"
+//#include "psArray.h"
+//#include "psImage.h"
+//#include "psList.h"
+//#include "psLookupTable.h"
+//#include "psHash.h"
+
+//#include "psMetadata.h"
+#include "psFits.h"
+#include "psPixels.h"
+//#include "psScalar.h"
+//#include "psVector.h"
+//#include "psFunctions.h"
+//#include "psTime.h"
+//#include "psCoord.h"
+#include "psSphereOps.h"
+//#include "psStats.h"
+#include "psMinimize.h"
+#include "psImageConvolve.h"
+#include "psTime.h"
 
 #include "psErrorText.h"
@@ -688,4 +709,258 @@
 }
 
+
+bool psMemCheckType(psDataType type,
+                    psPtr ptr)
+{
+    switch(type) {
+    case PS_DATA_ARRAY:
+        if ( psMemCheckArray(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_BITSET:
+        if ( psMemCheckBitSet(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+        /*    case PS_DATA_CELL:
+                if ( psMemCheckCell(ptr) )
+                    return true;
+                else
+                {
+                    psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+                    break;
+                }
+            case PS_DATA_CHIP:
+                if ( psMemCheckChip(ptr) )
+                    return true;
+                else
+                {
+                    psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+                    break;
+                }
+        */
+    case PS_DATA_CUBE:
+        if ( psMemCheckCube(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+
+
+    case PS_DATA_FITS:
+        if ( psMemCheckFits(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+
+    case PS_DATA_HASH:
+        if ( psMemCheckHash(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_HISTOGRAM:
+        if ( psMemCheckHistogram(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_IMAGE:
+        if ( psMemCheckImage(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_KERNEL:
+        if ( psMemCheckKernel(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_LIST:
+        if ( psMemCheckList(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_LOOKUPTABLE:
+        if ( psMemCheckLookupTable(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_METADATA:
+        if ( psMemCheckMetadata(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_METADATAITEM:
+        if ( psMemCheckMetadataItem(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_MINIMIZATION:
+        if ( psMemCheckMinimization(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_PIXELS:
+        if ( psMemCheckPixels(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_PLANE:
+        if ( psMemCheckPlane(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_PLANEDISTORT:
+        if ( psMemCheckPlaneDistort(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_PLANETRANSFORM:
+        if ( psMemCheckPlaneTransform(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_POLYNOMIAL1D:
+        if ( psMemCheckPolynomial1D(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_POLYNOMIAL2D:
+        if ( psMemCheckPolynomial2D(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_POLYNOMIAL3D:
+        if ( psMemCheckPolynomial3D(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_POLYNOMIAL4D:
+        if ( psMemCheckPolynomial4D(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_PROJECTION:
+        if ( psMemCheckProjection(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+
+        /*    case PS_DATA_READOUT:
+                if ( psMemCheckReadout(ptr) )
+                    return true;
+                else
+                {
+                    psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+                    break;
+                }
+         
+        *//*    case PS_DATA_REGION:
+                if ( psMemCheckRegion(ptr) )
+                    return true;
+                else
+                {
+                    psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+                    break;
+                }
+        */
+    case PS_DATA_SCALAR:
+        if ( psMemCheckScalar(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_SPHERE:
+        if ( psMemCheckSphere(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_SPHEREROT:
+        if ( psMemCheckSphereRot(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_SPLINE1D:
+        if ( psMemCheckSpline1D(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_STATS:
+        if ( psMemCheckStats(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_TIME:
+        if ( psMemCheckTime(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    case PS_DATA_VECTOR:
+        if ( psMemCheckVector(ptr) )
+            return true;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Incorrect pointer.  Datatypes do not match.\n");
+            break;
+        }
+    default:
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Invalid datatype specified.\n");
+    }
+    return false;
+}
+
+
 bool p_psMemGetPersistent(psPtr vptr)
 {
Index: /trunk/psLib/src/sys/psMemory.h
===================================================================
--- /trunk/psLib/src/sys/psMemory.h	(revision 4897)
+++ /trunk/psLib/src/sys/psMemory.h	(revision 4898)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-21 02:39:57 $
+ *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -172,4 +172,14 @@
 );
 
+/** Checks the deallocator to see if the pointer matches the desired datatype.
+ *
+ *  @return bool:       True if type matches, otherwise false.
+ */
+bool psMemCheckType(
+    psDataType type,                   ///< The desired psDataType to match
+    psPtr ptr                          ///< The desired pointer to match
+);
+
+
 /** Set the memory as persistent so that it is ignored when detecting memory leaks.
  *
Index: /trunk/psLib/src/types/psArray.c
===================================================================
--- /trunk/psLib/src/types/psArray.c	(revision 4897)
+++ /trunk/psLib/src/types/psArray.c	(revision 4898)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-22 23:47:13 $
+ *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -45,4 +45,10 @@
     psFree(psArr->data);
 }
+
+bool psMemCheckArray(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)arrayFree );
+}
+
 
 /*****************************************************************************
Index: /trunk/psLib/src/types/psArray.h
===================================================================
--- /trunk/psLib/src/types/psArray.h	(revision 4897)
+++ /trunk/psLib/src/types/psArray.h	(revision 4898)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-22 23:47:13 $
+ *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -47,4 +47,16 @@
 /*****************************************************************************/
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psArray structure, false otherwise.
+ */
+bool psMemCheckArray(
+    psPtr ptr                          ///< the pointer whose type to check
+)
+;
+
+
 /** Allocate an array.
  *
@@ -57,6 +69,5 @@
 psArray* psArrayAlloc(
     long nalloc                        ///< Total number of elements to make available.
-)
-;
+);
 
 /** Reallocate an array.
Index: /trunk/psLib/src/types/psBitSet.c
===================================================================
--- /trunk/psLib/src/types/psBitSet.c	(revision 4897)
+++ /trunk/psLib/src/types/psBitSet.c	(revision 4898)
@@ -11,6 +11,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-19 00:31:42 $
+ *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -65,4 +65,10 @@
     psFree(inBitSet->bits);
 }
+
+bool psMemCheckBitSet(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)bitSetFree );
+}
+
 
 psBitSet* psBitSetAlloc(long nalloc)
Index: /trunk/psLib/src/types/psBitSet.h
===================================================================
--- /trunk/psLib/src/types/psBitSet.h	(revision 4897)
+++ /trunk/psLib/src/types/psBitSet.h	(revision 4898)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-26 00:44:45 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -47,4 +47,16 @@
 /*****************************************************************************/
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psBitSet structure, false otherwise.
+ */
+bool psMemCheckBitSet(
+    psPtr ptr                          ///< the pointer whose type to check
+)
+;
+
+
 /** Allocate a psBitSet.
  *
@@ -56,6 +68,5 @@
 psBitSet* psBitSetAlloc(
     long nalloc                            ///< Number of bits in psBitSet array
-)
-;
+);
 
 /** Set a bit.
Index: /trunk/psLib/src/types/psHash.c
===================================================================
--- /trunk/psLib/src/types/psHash.c	(revision 4897)
+++ /trunk/psLib/src/types/psHash.c	(revision 4898)
@@ -12,6 +12,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-15 02:33:54 $
+*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -160,4 +160,10 @@
 }
 
+bool psMemCheckHash(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)hashFree );
+}
+
+
 /******************************************************************************
 hashFree(table): This procedure deallocates the specified hash
Index: /trunk/psLib/src/types/psHash.h
===================================================================
--- /trunk/psLib/src/types/psHash.h	(revision 4897)
+++ /trunk/psLib/src/types/psHash.h	(revision 4898)
@@ -11,6 +11,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -46,9 +46,20 @@
 psHash;
 
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psHash structure, false otherwise.
+ */
+bool psMemCheckHash(
+    psPtr ptr                          ///< the pointer whose type to check
+)
+;
+
+
 /// Allocate hash buckets in table.
 psHash* psHashAlloc(
     long nalloc                        ///< The number of buckets to allocate.
-)
-;
+);
 
 /// Insert entry into table.
Index: /trunk/psLib/src/types/psList.c
===================================================================
--- /trunk/psLib/src/types/psList.c	(revision 4897)
+++ /trunk/psLib/src/types/psList.c	(revision 4898)
@@ -6,6 +6,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -148,4 +148,11 @@
     return list;
 }
+
+bool psMemCheckList(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)listFree );
+}
+
+
 
 psListIterator* psListIteratorAlloc(psList* list, long location, bool mutable)
Index: /trunk/psLib/src/types/psList.h
===================================================================
--- /trunk/psLib/src/types/psList.h	(revision 4897)
+++ /trunk/psLib/src/types/psList.h	(revision 4898)
@@ -7,6 +7,6 @@
  *  @ingroup LinkedList
  *
- *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-21 02:39:57 $
+ *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -84,13 +84,23 @@
 
 
-/** Creates a psList linked list object.
- *
- *  @return psList* A new psList object.
- */
-psList* psListAlloc(
-    psPtr data
-    ///< initial data item; may be NULL if no an empty psList is desired
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psList structure, false otherwise.
+ */
+bool psMemCheckList(
+    psPtr ptr                          ///< the pointer whose type to check
 )
 ;
+
+
+/** Creates a psList linked list object.
+ *
+ *  @return psList* A new psList object.
+ */
+psList* psListAlloc(
+    psPtr data          ///< initial data item; may be NULL if an empty psList is desired
+);
 
 /** Creates a psListIterator object and associates it with a psList.
Index: /trunk/psLib/src/types/psLookupTable.c
===================================================================
--- /trunk/psLib/src/types/psLookupTable.c	(revision 4897)
+++ /trunk/psLib/src/types/psLookupTable.c	(revision 4898)
@@ -7,6 +7,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-21 01:40:10 $
+*  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
@@ -263,4 +263,10 @@
 /* FUNCTION IMPLEMENTATION - PUBLIC                                          */
 /*****************************************************************************/
+
+bool psMemCheckLookupTable(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)lookupTableFree );
+}
+
 
 psLookupTable* psLookupTableAlloc(const char *filename,
Index: /trunk/psLib/src/types/psLookupTable.h
===================================================================
--- /trunk/psLib/src/types/psLookupTable.h	(revision 4897)
+++ /trunk/psLib/src/types/psLookupTable.h	(revision 4898)
@@ -7,6 +7,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-21 01:40:10 $
+*  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -60,4 +60,15 @@
     PS_PARSE_ERROR_GENERAL        = 0x0104         ///< Any other type of lookup error
 }psParseErrorType;
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psLookupTable structure, false otherwise.
+ */
+bool psMemCheckLookupTable(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
 
 /** Allocator for psLookupTable struct
Index: /trunk/psLib/src/types/psMetadata.c
===================================================================
--- /trunk/psLib/src/types/psMetadata.c	(revision 4897)
+++ /trunk/psLib/src/types/psMetadata.c	(revision 4898)
@@ -12,6 +12,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-27 01:33:41 $
+*  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -162,4 +162,10 @@
     return metadataItem;
 }
+
+bool psMemCheckMetadataItem(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)metadataItemFree );
+}
+
 
 #define METADATAITEM_ALLOC_TYPE(NAME,TYPE,METATYPE) \
@@ -273,4 +279,12 @@
     return metadata;
 }
+
+
+bool psMemCheckMetadata(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)metadataFree );
+}
+
+
 
 bool psMetadataAddItem(psMetadata *md,
Index: /trunk/psLib/src/types/psMetadata.h
===================================================================
--- /trunk/psLib/src/types/psMetadata.h	(revision 4897)
+++ /trunk/psLib/src/types/psMetadata.h	(revision 4898)
@@ -11,6 +11,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-27 01:33:41 $
+*  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -155,4 +155,16 @@
 ;
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psMetadataItem structure, false otherwise.
+ */
+bool psMemCheckMetadataItem(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Create a metadata item with specified string data.
  *
@@ -253,4 +265,16 @@
 psMetadata* psMetadataAlloc(void);
 
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psMetadata structure, false otherwise.
+ */
+bool psMemCheckMetadata(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
+
 /** Add existing metadata item to metadata collection.
  *
Index: /trunk/psLib/src/types/psPixels.c
===================================================================
--- /trunk/psLib/src/types/psPixels.c	(revision 4897)
+++ /trunk/psLib/src/types/psPixels.c	(revision 4898)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-22 22:19:27 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -71,4 +71,11 @@
     return out;
 }
+
+
+bool psMemCheckPixels(psPtr ptr)
+{
+    return ( psMemGetDeallocator(ptr) == (psFreeFunc)pixelsFree );
+}
+
 
 psPixels* psPixelsRealloc(psPixels* pixels, long nalloc)
Index: /trunk/psLib/src/types/psPixels.h
===================================================================
--- /trunk/psLib/src/types/psPixels.h	(revision 4897)
+++ /trunk/psLib/src/types/psPixels.h	(revision 4898)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-25 20:49:04 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -57,4 +57,15 @@
 )
 ;
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
+ *
+ *  @return bool:       True if the pointer matches a psPixels structure, false otherwise.
+ */
+bool psMemCheckPixels(
+    psPtr ptr                          ///< the pointer whose type to check
+);
+
 
 /** resizes a psPixels structure
Index: /trunk/psLib/test/sys/tst_psMemory.c
===================================================================
--- /trunk/psLib/test/sys/tst_psMemory.c	(revision 4897)
+++ /trunk/psLib/test/sys/tst_psMemory.c	(revision 4898)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-25 23:42:07 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-30 01:14:13 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -35,4 +35,5 @@
 static psS32 TPmemCorruption( void );
 static psS32 TPmultipleFree( void );
+static psS32 memCheckTypes( void );
 void memProblemCallback( psMemBlock *ptr, const char *filename, unsigned int lineno );
 
@@ -53,4 +54,5 @@
                               {TPFreeReferencedMemory, 456, "freeReferencedMemory", 0, false},
                               {TPmultipleFree, 699, "multipleFree", -6, false},
+                              {memCheckTypes, 700, "psMemCheckType", 0, false},
                               {NULL}
                           };
@@ -534,2 +536,296 @@
     return 0;
 }
+
+static psS32 memCheckTypes( void )
+{
+    //    psArray *negative;
+    //    negative = psArrayAlloc(2);
+    //    psMetadata *neg;
+    //    neg = psMetadataAlloc();
+
+    psArray *array;
+    array = psArrayAlloc(100);
+    if ( !psMemCheckType(PS_DATA_ARRAY, array) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckArray failed in memCheckType. \n");
+        psFree(array);
+        return 1;
+    }
+    //    if ( psMemCheckType(PS_DATA_ARRAY, neg) )
+    //    {
+    //        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckArray failed in memCheckType. \n");
+    //        return 1;
+    //    }
+    psFree(array);
+
+    psBitSet *bits;
+    bits = psBitSetAlloc(100);
+    if ( !psMemCheckType(PS_DATA_BITSET, bits) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckBitSet failed in memCheckType. \n");
+        psFree(bits);
+        return 1;
+    }
+    //    if ( psMemCheckType(PS_DATA_BITSET, negative) )
+    //    {
+    //        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckBitSet failed in memCheckType. \n");
+    //        return 1;
+    //    }
+    psFree(bits);
+
+    psCube *cube;
+    cube = psCubeAlloc();
+    if ( !psMemCheckType(PS_DATA_CUBE, cube) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckCube failed in memCheckType. \n");
+        psFree(cube);
+        return 1;
+    }
+    psFree(cube);
+
+    /*
+        psFits *fits;
+        char *filename = "";
+        fits = psFitsAlloc(filename);
+        if ( !psMemCheckType(PS_DATA_FITS, fits) )
+        {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckFits failed in memCheckType. \n");
+            psFree(fits);
+            return 1;
+        }
+        psFree(fits);
+    */
+    psHash *hash;
+    hash = psHashAlloc(100);
+    if ( !psMemCheckType(PS_DATA_HASH, hash) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckHash failed in memCheckType. \n");
+        psFree(hash);
+        return 1;
+    }
+    psFree(hash);
+
+    psHistogram *histogram;
+    histogram = psHistogramAlloc(1.1, 2.2, 2);
+    if ( !psMemCheckType(PS_DATA_HISTOGRAM, histogram) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckHistogram failed in memCheckType. \n");
+        psFree(histogram);
+        return 1;
+    }
+    psFree(histogram);
+
+    psImage *image;
+    image = psImageAlloc(5, 5, PS_TYPE_F32);
+    if ( !psMemCheckType(PS_DATA_IMAGE, image) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckImage failed in memCheckType. \n");
+        psFree(image);
+        return 1;
+    }
+    psFree(image);
+
+    psKernel *kernel;
+    kernel = psKernelAlloc(0, 1, 0, 1);
+    if ( !psMemCheckType(PS_DATA_KERNEL, kernel) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckKernel failed in memCheckType. \n");
+        psFree(kernel);
+        return 1;
+    }
+    psFree(kernel);
+
+    psList *list;
+    list = psListAlloc(NULL);
+    if ( !psMemCheckType(PS_DATA_LIST, list) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckList failed in memCheckType. \n");
+        psFree(list);
+        return 1;
+    }
+    psFree(list);
+
+    /*
+        psLookupTable *lookup;
+        char *filename = "";
+        char *format = "%d";
+        lookup = psLookupTableAlloc(filename, format, 0);
+        if ( !psMemCheckType(PS_DATA_LOOKUPTABLE, lookup) )
+        {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckLookupTable failed in memCheckType. \n");
+            psFree(lookup);
+            return 1;
+        }
+        psFree(lookup);
+    */
+    psMetadata *metadata;
+    metadata = psMetadataAlloc();
+    if ( !psMemCheckType(PS_DATA_METADATA, metadata) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckMetadata failed in memCheckType. \n");
+        psFree(metadata);
+        return 1;
+    }
+    psFree(metadata);
+
+    psMetadataItem *metaItem;
+    metaItem = psMetadataItemAlloc("name", PS_DATA_S32, "COMMENT", 1);
+    if ( !psMemCheckType(PS_DATA_METADATAITEM, metaItem) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckMetadataItem failed in memCheckType. \n");
+        psFree(metaItem);
+        return 1;
+    }
+    psFree(metaItem);
+
+    psMinimization *min;
+    min = psMinimizationAlloc(3, 0.1);
+    if ( !psMemCheckType(PS_DATA_MINIMIZATION, min) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckMinimization failed in memCheckType. \n");
+        psFree(min);
+        return 1;
+    }
+    psFree(min);
+
+    psPixels *pixels;
+    pixels = psPixelsAlloc(100);
+    if ( !psMemCheckType(PS_DATA_PIXELS, pixels) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPixels failed in memCheckType. \n");
+        psFree(pixels);
+        return 1;
+    }
+    psFree(pixels);
+
+    psPlane *plane;
+    plane = psPlaneAlloc();
+    if ( !psMemCheckType(PS_DATA_PLANE, plane) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPlane failed in memCheckType. \n");
+        psFree(plane);
+        return 1;
+    }
+    psFree(plane);
+
+    psPlaneDistort *planeDistort;
+    planeDistort = psPlaneDistortAlloc(1, 1, 1, 1);
+    if ( !psMemCheckType(PS_DATA_PLANEDISTORT, planeDistort) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPlaneDistort failed in memCheckType. \n");
+        psFree(planeDistort);
+        return 1;
+    }
+    psFree(planeDistort);
+
+    psPlaneTransform *planeTransform;
+    planeTransform = psPlaneTransformAlloc(1, 1);
+    if ( !psMemCheckType(PS_DATA_PLANETRANSFORM, planeTransform) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPlaneTransform failed in memCheckType. \n");
+        psFree(planeTransform);
+        return 1;
+    }
+    psFree(planeTransform);
+
+    psPolynomial1D *poly1;
+    poly1 = psPolynomial1DAlloc(2, PS_POLYNOMIAL_ORD);
+    if ( !psMemCheckType(PS_DATA_POLYNOMIAL1D, poly1) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial1D failed in memCheckType. \n");
+        psFree(poly1);
+        return 1;
+    }
+    psFree(poly1);
+
+    psPolynomial2D *poly2;
+    poly2 = psPolynomial2DAlloc(2, 1, PS_POLYNOMIAL_ORD);
+    if ( !psMemCheckType(PS_DATA_POLYNOMIAL2D, poly2) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial2D failed in memCheckType. \n");
+        psFree(poly2);
+        return 1;
+    }
+    psFree(poly2);
+
+    psPolynomial3D *poly3;
+    poly3 = psPolynomial3DAlloc(2, 1, 2, PS_POLYNOMIAL_ORD);
+    if ( !psMemCheckType(PS_DATA_POLYNOMIAL3D, poly3) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial3D failed in memCheckType. \n");
+        psFree(poly3);
+        return 1;
+    }
+    psFree(poly3);
+
+    psPolynomial4D *poly4;
+    poly4 = psPolynomial4DAlloc(2, 1, 2, 1, PS_POLYNOMIAL_ORD);
+    if ( !psMemCheckType(PS_DATA_POLYNOMIAL4D, poly4) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckPolynomial4D failed in memCheckType. \n");
+        psFree(poly4);
+        return 1;
+    }
+    psFree(poly4);
+
+    psProjection *proj;
+    proj = psProjectionAlloc(1, 1, 2.1, 2.1, PS_PROJ_TAN);
+    if ( !psMemCheckType(PS_DATA_PROJECTION, proj) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckProjection failed in memCheckType. \n");
+        psFree(proj);
+        return 1;
+    }
+    psFree(proj);
+
+    psScalar *scalar;
+    psC64 c64 = 1.1 + 7I;
+    scalar = psScalarAlloc(c64, PS_TYPE_F64);
+    if ( !psMemCheckType(PS_DATA_SCALAR, scalar) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckScalar failed in memCheckType. \n");
+        psFree(scalar);
+        return 1;
+    }
+    psFree(scalar);
+
+    psSphere *sphere;
+    sphere = psSphereAlloc();
+    if ( !psMemCheckType(PS_DATA_SPHERE, sphere) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckSphere failed in memCheckType. \n");
+        psFree(sphere);
+        return 1;
+    }
+    psFree(sphere);
+
+    psSphereRot *sphereRot;
+    sphereRot = psSphereRotAlloc(0, 0, 20);
+    if ( !psMemCheckType(PS_DATA_SPHEREROT, sphereRot) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckSphereRot failed in memCheckType. \n");
+        psFree(sphereRot);
+        return 1;
+    }
+    psFree(sphereRot);
+
+    psSpline1D *spline;
+    spline = psSpline1DAlloc(2, 1, 0, 2);
+    if ( !psMemCheckType(PS_DATA_SPLINE1D, spline) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckSpline1D failed in memCheckType. \n");
+        psFree(spline);
+        return 1;
+    }
+    psFree(spline);
+
+    psStats *stats;
+    stats = psStatsAlloc(PS_STAT_MAX);
+    if ( !psMemCheckType(PS_DATA_STATS, stats) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckStats failed in memCheckType. \n");
+        psFree(stats);
+        return 1;
+    }
+    psFree(stats);
+
+    /*    psTime *time;
+        time = psTimeAlloc(PS_TIME_UT1);
+        if ( !psMemCheckType(PS_DATA_TIME, time) )
+        {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckTime failed in memCheckType. \n");
+            psFree(time);
+            return 1;
+        }
+        psFree(time);
+    */
+    psVector *vector;
+    vector = psVectorAlloc(100, PS_TYPE_F32);
+    if ( !psMemCheckType(PS_DATA_VECTOR, vector) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psMemCheckVector failed in memCheckType. \n");
+        psFree(vector);
+        return 1;
+    }
+    psFree(vector);
+
+
+    //    psFree(negative);
+    //    psFree(neg);
+
+    return 0;
+}
Index: /trunk/psLib/test/sys/verified/tst_psMemory.stderr
===================================================================
--- /trunk/psLib/test/sys/verified/tst_psMemory.stderr	(revision 4897)
+++ /trunk/psLib/test/sys/verified/tst_psMemory.stderr	(revision 4898)
@@ -151,2 +151,11 @@
 ---> TESTPOINT PASSED (psMemory{multipleFree} | tst_psMemory.c)
 
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psMemory.c                                             *
+*            TestPoint: psMemory{psMemCheckType}                                   *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psMemory{psMemCheckType} | tst_psMemory.c)
+
Index: /trunk/psLib/test/types/tst_psArray.c
===================================================================
--- /trunk/psLib/test/types/tst_psArray.c	(revision 4897)
+++ /trunk/psLib/test/types/tst_psArray.c	(revision 4898)
@@ -17,6 +17,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2005-07-13 02:47:01 $
+ *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2005-08-30 01:14:13 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -52,4 +52,5 @@
 static psS32 testArray01( void );
 static psS32 testArrayAdd( void );
+
 
 testDescription tests[] = {
@@ -439,3 +440,2 @@
     return 0;  // the value that indicates success is part of the testDescription
 }
-
