Index: /trunk/psLib/test/sysUtils/tst_psMemory.c
===================================================================
--- /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 537)
+++ /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 537)
@@ -0,0 +1,50 @@
+/** @file  tstMemory.c
+ *
+ *  @brief Contains the tests for psMemory.[ch]
+ *
+ *
+ *  @author Robert DeSonia, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-04-28 02:29:13 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
+
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "psTest.h"
+#include "psMemory.h"
+
+int TPFreeReferencedMemory(void);
+
+testDescription tests[] = {
+                              {TPFreeReferencedMemory,"TPFreeReferencedMemory",6},
+                              {NULL}
+                          };
+
+int main()
+{
+    runTestSuite(stderr,"psMemory",tests);
+}
+
+int TPFreeReferencedMemory(void)
+{
+    // create memory
+    int* mem;
+
+    printf("Allocating buffer\n");
+    mem = (int*) psAlloc(100*sizeof(int));
+
+    psMemIncrRefCounter(mem);
+    printf("Freeing first time\n");
+    psFree(mem);
+
+    printf("I survived?\n");
+
+    return 0;
+}
+
