Index: /branches/eam_branches/ohana.20190329/src/libohana/include/ohana_allocate.h
===================================================================
--- /branches/eam_branches/ohana.20190329/src/libohana/include/ohana_allocate.h	(revision 40773)
+++ /branches/eam_branches/ohana.20190329/src/libohana/include/ohana_allocate.h	(revision 40774)
@@ -44,4 +44,7 @@
 void ohana_memcheck_block_func (const char *myFile, int myLine, const char *myFunc, void *in);
 void  real_free (void *in);
+
+void ohana_memdump_strings_file (FILE *f, int VERBOSE);
+void ohana_memdump_set_maxlines (int N);
 
 # define ohana_memcheck(X) ohana_memcheck_func (__FILE__, __LINE__, __func__, X)
Index: /branches/eam_branches/ohana.20190329/src/libohana/src/ohana_allocate.c
===================================================================
--- /branches/eam_branches/ohana.20190329/src/libohana/src/ohana_allocate.c	(revision 40773)
+++ /branches/eam_branches/ohana.20190329/src/libohana/src/ohana_allocate.c	(revision 40774)
@@ -45,4 +45,6 @@
 
 static pthread_mutex_t memBlockListMutex = PTHREAD_MUTEX_INITIALIZER;
+
+static int NblockMaxDump = 100;
 
 void ohana_meminit () {
@@ -435,5 +437,5 @@
 	fprintf (stderr, "memory corruption\n");
       }
-      if (Nbad < 100) {
+      if (Nbad < NblockMaxDump) {
 	fprintf (stderr, "  file: %s, line: %d, func: %s\n", thisBlock->file, thisBlock->line, thisBlock->func);
       }
@@ -613,5 +615,5 @@
     Nbytes += thisBlock->size;
 
-    if (Ntotal < 100) {
+    if (Ntotal < NblockMaxDump) {
       if (good) {
 	fprintf (f, "  %zd  %zd  %zd  GOOD  %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
@@ -677,2 +679,49 @@
   return memstats;
 }
+
+void ohana_memdump_strings_file (FILE *f, int VERBOSE) {
+
+  if (!lastBlock) {
+    if (VERBOSE) fprintf (f, "no memory allocated\n");
+    return;
+  }
+
+  OhanaMemblock *thisBlock = lastBlock;
+
+  size_t Ntotal = 0;
+  size_t Nbytes = 0;
+  size_t Nstring = 0;
+
+  fprintf (f, "    entry |    bytes | cumulative : line : string\n");
+
+  while (thisBlock) {
+
+    // pointer to the start of the user memory
+    char *ptr = (char *)(thisBlock + 1);
+
+    Ntotal ++;
+    Nbytes += thisBlock->size;
+
+    int N = strlen(thisBlock->file);
+    if (N > 22) {
+      int found = !strcmp("libohana/src/string.c", &thisBlock->file[N - 21]);
+      if (found) {
+	if (Nstring < NblockMaxDump) {
+	  fprintf (f, " %8zd | %8zd | %10zd : %4d : %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->line, ptr);
+	}
+	Nstring ++;
+      }
+      thisBlock = thisBlock->prevBlock;
+    }
+  }
+
+  if (Nstring || VERBOSE) {
+    fprintf (f, "%zd strings allocated\n", Nstring);
+  }
+
+  return;
+}
+
+void ohana_memdump_set_maxlines (int N) {
+  NblockMaxDump = N;
+}
