Index: tests/.expect/alloc-ERROR.txt
===================================================================
--- tests/.expect/alloc-ERROR.txt	(revision 665f43269c6958cbb65487dbaac9e440b9cd5815)
+++ tests/.expect/alloc-ERROR.txt	(revision 6a25b8fed369bf40a8c17de44aa2f99f605e77ab)
@@ -1,3 +1,3 @@
-alloc.cfa:311:1 error: No reasonable alternatives for expression Applying untyped:
+alloc.cfa:317:1 error: No reasonable alternatives for expression Applying untyped:
   Name: ?=?
 ...to:
@@ -19,5 +19,5 @@
 
 
-alloc.cfa:312:1 error: No reasonable alternatives for expression Applying untyped:
+alloc.cfa:318:1 error: No reasonable alternatives for expression Applying untyped:
   Name: ?=?
 ...to:
@@ -39,5 +39,5 @@
 
 
-alloc.cfa:313:1 error: No reasonable alternatives for expression Applying untyped:
+alloc.cfa:319:1 error: No reasonable alternatives for expression Applying untyped:
   Name: ?=?
 ...to:
@@ -50,5 +50,5 @@
 
 
-alloc.cfa:314:1 error: No reasonable alternatives for expression Applying untyped:
+alloc.cfa:320:1 error: No reasonable alternatives for expression Applying untyped:
   Name: ?=?
 ...to:
Index: tests/.expect/alloc.txt
===================================================================
--- tests/.expect/alloc.txt	(revision 665f43269c6958cbb65487dbaac9e440b9cd5815)
+++ tests/.expect/alloc.txt	(revision 6a25b8fed369bf40a8c17de44aa2f99f605e77ab)
@@ -30,10 +30,10 @@
 CFA resize array alloc
 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 
-CFA resize array alloc, fill
+CFA resize array alloc
 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 
-CFA resize array alloc, fill
+CFA resize array alloc
 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 
 CFA resize array alloc, fill
-0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 
+0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 
 
 C   memalign 42 42.5
Index: tests/alloc.cfa
===================================================================
--- tests/alloc.cfa	(revision 665f43269c6958cbb65487dbaac9e440b9cd5815)
+++ tests/alloc.cfa	(revision 6a25b8fed369bf40a8c17de44aa2f99f605e77ab)
@@ -10,6 +10,6 @@
 // Created On       : Wed Feb  3 07:56:22 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Oct 20 21:45:21 2019
-// Update Count     : 391
+// Last Modified On : Fri Nov 22 15:34:19 2019
+// Update Count     : 404
 //
 
@@ -126,5 +126,5 @@
 
 	p = alloc( p, 2 * dim );                            // CFA resize array alloc
-	for ( i; dim ~ 2 * dim ) { p[i] = 0x1010101; }
+	for ( i; dim ~ 2 * dim ) { p[i] = 0x1010101; }		// fill upper part
 	printf( "CFA resize array alloc\n" );
 	for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
@@ -139,5 +139,5 @@
 
 	p = alloc_set( p, 3 * dim, fill );					// CFA resize array alloc, fill
-	printf( "CFA resize array alloc, fill\n" );
+	printf( "CFA resize array alloc\n" );
 	for ( i; 3 * dim ) { printf( "%#x ", p[i] ); }
 	printf( "\n" );
@@ -145,5 +145,5 @@
 
 	p = alloc_set( p, dim, fill );						// CFA resize array alloc, fill
-	printf( "CFA resize array alloc, fill\n" );
+	printf( "CFA resize array alloc\n" );
 	for ( i; dim ) { printf( "%#x ", p[i] ); }
 	printf( "\n" );
Index: tests/heap.cfa
===================================================================
--- tests/heap.cfa	(revision 665f43269c6958cbb65487dbaac9e440b9cd5815)
+++ tests/heap.cfa	(revision 6a25b8fed369bf40a8c17de44aa2f99f605e77ab)
@@ -10,6 +10,6 @@
 // Created On       : Tue Nov  6 17:54:56 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 19 08:22:34 2019
-// Update Count     : 19
+// Last Modified On : Wed Nov 20 16:10:24 2019
+// Update Count     : 25
 // 
 
@@ -74,5 +74,5 @@
 		size_t s = (i + 1) * 20;
 		char * area = (char *)malloc( s );
-		if ( area == 0 ) abort( "malloc/free out of memory" );
+		if ( area == 0p ) abort( "malloc/free out of memory" );
 		area[0] = '\345'; area[s - 1] = '\345';			// fill first/last
 		area[malloc_usable_size( area ) - 1] = '\345';	// fill ultimate byte
@@ -83,5 +83,5 @@
 		size_t s = i + 1;								// +1 to make initialization simpler
 		locns[i] = (char *)malloc( s );
-		if ( locns[i] == 0 ) abort( "malloc/free out of memory" );
+		if ( locns[i] == 0p ) abort( "malloc/free out of memory" );
 		locns[i][0] = '\345'; locns[i][s - 1] = '\345';	// fill first/last
 		locns[i][malloc_usable_size( locns[i] ) - 1] = '\345'; // fill ultimate byte
@@ -99,5 +99,5 @@
 		size_t s = i + default_mmap_start();			// cross over point
 		char * area = (char *)malloc( s );
-		if ( area == 0 ) abort( "malloc/free out of memory" );
+		if ( area == 0p ) abort( "malloc/free out of memory" );
 		area[0] = '\345'; area[s - 1] = '\345';			// fill first/last
 		area[malloc_usable_size( area ) - 1] = '\345';	// fill ultimate byte
@@ -108,5 +108,5 @@
 		size_t s = i + default_mmap_start();			// cross over point
 		locns[i] = (char *)malloc( s );
-		if ( locns[i] == 0 ) abort( "malloc/free out of memory" );
+		if ( locns[i] == 0p ) abort( "malloc/free out of memory" );
 		locns[i][0] = '\345'; locns[i][s - 1] = '\345';	// fill first/last
 		locns[i][malloc_usable_size( locns[i] ) - 1] = '\345'; // fill ultimate byte
@@ -124,5 +124,5 @@
 		size_t s = (i + 1) * 20;
 		char * area = (char *)calloc( 5, s );
-		if ( area == 0 ) abort( "calloc/free out of memory" );
+		if ( area == 0p ) abort( "calloc/free out of memory" );
 		if ( area[0] != '\0' || area[s - 1] != '\0' ||
 			 area[malloc_usable_size( area ) - 1] != '\0' ||
@@ -136,5 +136,5 @@
 		size_t s = i + 1;
 		locns[i] = (char *)calloc( 5, s );
-		if ( locns[i] == 0 ) abort( "calloc/free out of memory" );
+		if ( locns[i] == 0p ) abort( "calloc/free out of memory" );
 		if ( locns[i][0] != '\0' || locns[i][s - 1] != '\0' ||
 			 locns[i][malloc_usable_size( locns[i] ) - 1] != '\0' ||
@@ -155,5 +155,5 @@
 		size_t s = i + default_mmap_start();			// cross over point
 		char * area = (char *)calloc( 1, s );
-		if ( area == 0 ) abort( "calloc/free out of memory" );
+		if ( area == 0p ) abort( "calloc/free out of memory" );
 		if ( area[0] != '\0' || area[s - 1] != '\0' ) abort( "calloc/free corrupt storage4.1" );
 		if ( area[malloc_usable_size( area ) - 1] != '\0' ) abort( "calloc/free corrupt storage4.2" );
@@ -167,5 +167,5 @@
 		size_t s = i + default_mmap_start();			// cross over point
 		locns[i] = (char *)calloc( 1, s );
-		if ( locns[i] == 0 ) abort( "calloc/free out of memory" );
+		if ( locns[i] == 0p ) abort( "calloc/free out of memory" );
 		if ( locns[i][0] != '\0' || locns[i][s - 1] != '\0' ||
 			 locns[i][malloc_usable_size( locns[i] ) - 1] != '\0' ||
@@ -189,10 +189,10 @@
 		for ( s; 1 ~ NoOfAllocs ) {						// allocation of size 0 can return null
 			char * area = (char *)memalign( a, s );
-			if ( area == 0 ) abort( "memalign/free out of memory" );
-			//sout | i | " " | area;
+			if ( area == 0p ) abort( "memalign/free out of memory" );
+			//sout | i | area;
 			if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
 				abort( "memalign/free bad alignment : memalign(%d,%d) = %p", (int)a, s, area );
 			} // if
-			area[0] = '\345'; area[s - 1] = '\345';	// fill first/last byte
+			area[0] = '\345'; area[s - 1] = '\345';		// fill first/last byte
 			area[malloc_usable_size( area ) - 1] = '\345'; // fill ultimate byte
 			free( area );
@@ -207,6 +207,6 @@
 			size_t s = i + default_mmap_start();		// cross over point
 			char * area = (char *)memalign( a, s );
-			if ( area == 0 ) abort( "memalign/free out of memory" );
-			//sout | i | " " | area;
+			if ( area == 0p ) abort( "memalign/free out of memory" );
+			//sout | i | area;
 			if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
 				abort( "memalign/free bad alignment : memalign(%d,%d) = %p", (int)a, (int)s, area );
@@ -223,5 +223,5 @@
 		// initial N byte allocation
 		char * area = (char *)calloc( 5, i );
-		if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
+		if ( area == 0p ) abort( "calloc/realloc/free out of memory" );
 		if ( area[0] != '\0' || area[i - 1] != '\0' ||
 			 area[malloc_usable_size( area ) - 1] != '\0' ||
@@ -231,5 +231,5 @@
 		for ( s; i ~ 256 * 1024 ~ 26 ) {				// start at initial memory request
 			area = (char *)realloc( area, s );			// attempt to reuse storage
-			if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
+			if ( area == 0p ) abort( "calloc/realloc/free out of memory" );
 			if ( area[0] != '\0' || area[s - 1] != '\0' ||
 				 area[malloc_usable_size( area ) - 1] != '\0' ||
@@ -245,5 +245,5 @@
 		size_t s = i + default_mmap_start();			// cross over point
 		char * area = (char *)calloc( 1, s );
-		if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
+		if ( area == 0p ) abort( "calloc/realloc/free out of memory" );
 		if ( area[0] != '\0' || area[s - 1] != '\0' ||
 			 area[malloc_usable_size( area ) - 1] != '\0' ||
@@ -253,5 +253,5 @@
 		for ( r; i ~ 256 * 1024 ~ 26 ) {				// start at initial memory request
 			area = (char *)realloc( area, r );			// attempt to reuse storage
-			if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
+			if ( area == 0p ) abort( "calloc/realloc/free out of memory" );
 			if ( area[0] != '\0' || area[r - 1] != '\0' ||
 				 area[malloc_usable_size( area ) - 1] != '\0' ||
@@ -267,6 +267,6 @@
 		// initial N byte allocation
 		char * area = (char *)memalign( a, amount );	// aligned N-byte allocation
-		if ( area == 0 ) abort( "memalign/realloc/free out of memory" ); // no storage ?
-		//sout | alignments[a] | " " | area;
+		if ( area == 0p ) abort( "memalign/realloc/free out of memory" ); // no storage ?
+		//sout | alignments[a] | area;
 		if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
 			abort( "memalign/realloc/free bad alignment : memalign(%d,%d) = %p", (int)a, (int)amount, area );
@@ -278,6 +278,6 @@
 			if ( area[0] != '\345' || area[s - 2] != '\345' ) abort( "memalign/realloc/free corrupt storage" );
 			area = (char *)realloc( area, s );			// attempt to reuse storage
-			if ( area == 0 ) abort( "memalign/realloc/free out of memory" ); // no storage ?
-			//sout | i | " " | area;
+			if ( area == 0p ) abort( "memalign/realloc/free out of memory" ); // no storage ?
+			//sout | i | area;
 			if ( (size_t)area % a != 0 ) {				// check for initial alignment
 				abort( "memalign/realloc/free bad alignment %p", area );
@@ -294,6 +294,6 @@
 		for ( s; 1 ~ limit ) {							// allocation of size 0 can return null
 			char * area = (char *)cmemalign( a, 1, s );
-			if ( area == 0 ) abort( "cmemalign/free out of memory" );
-			//sout | i | " " | area;
+			if ( area == 0p ) abort( "cmemalign/free out of memory" );
+			//sout | i | area;
 			if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
 				abort( "cmemalign/free bad alignment : cmemalign(%d,%d) = %p", (int)a, s, area );
@@ -313,6 +313,6 @@
 		// initial N byte allocation
 		char * area = (char *)cmemalign( a, 1, amount ); // aligned N-byte allocation
-		if ( area == 0 ) abort( "cmemalign/realloc/free out of memory" ); // no storage ?
-		//sout | alignments[a] | " " | area;
+		if ( area == 0p ) abort( "cmemalign/realloc/free out of memory" ); // no storage ?
+		//sout | alignments[a] | area;
 		if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
 			abort( "cmemalign/realloc/free bad alignment : cmemalign(%d,%d) = %p", (int)a, (int)amount, area );
@@ -327,8 +327,68 @@
 			if ( area[0] != '\345' || area[s - 2] != '\345' ) abort( "cmemalign/realloc/free corrupt storage2" );
 			area = (char *)realloc( area, s );			// attempt to reuse storage
-			if ( area == 0 ) abort( "cmemalign/realloc/free out of memory" ); // no storage ?
-			//sout | i | " " | area;
+			if ( area == 0p ) abort( "cmemalign/realloc/free out of memory" ); // no storage ?
+			//sout | i | area;
 			if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
 				abort( "cmemalign/realloc/free bad alignment %p", area );
+			} // if
+			if ( area[s - 1] != '\0' || area[s - 1] != '\0' ||
+				 area[malloc_usable_size( area ) - 1] != '\0' ||
+				 ! malloc_zero_fill( area ) ) abort( "cmemalign/realloc/free corrupt storage3" );
+			area[s - 1] = '\345';						// fill last byte
+		} // for
+		free( area );
+	} // for
+
+	// check memalign/realloc with align/free
+
+	amount = 2;
+	for ( a; libAlign() ~= limit ~ a ) {				// generate powers of 2
+		// initial N byte allocation
+		char * area = (char *)memalign( a, amount );	// aligned N-byte allocation
+		if ( area == 0p ) abort( "memalign/realloc with align/free out of memory" ); // no storage ?
+		//sout | alignments[a] | area | endl;
+		if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
+			abort( "memalign/realloc with align/free bad alignment : memalign(%d,%d) = %p", (int)a, (int)amount, area );
+		} // if
+		area[0] = '\345'; area[amount - 2] = '\345';	// fill first/penultimate byte
+
+		// Do not start this loop index at 0 because realloc of 0 bytes frees the storage.
+		for ( s; amount ~ 256 * 1024 ) {				// start at initial memory request
+			if ( area[0] != '\345' || area[s - 2] != '\345' ) abort( "memalign/realloc/free corrupt storage" );
+			area = (char *)realloc( area, a * 2, s );	// attempt to reuse storage
+			if ( area == 0p ) abort( "memalign/realloc with align/free out of memory" ); // no storage ?
+			//sout | i | area | endl;
+			if ( (size_t)area % a * 2 != 0 ) {			// check for initial alignment
+				abort( "memalign/realloc with align/free bad alignment %p", area );
+			} // if
+			area[s - 1] = '\345';						// fill last byte
+		} // for
+		free( area );
+	} // for
+
+	// check cmemalign/realloc with align/free
+
+	amount = 2;
+	for ( size_t a = libAlign() + libAlign(); a <= limit; a += a ) { // generate powers of 2
+		// initial N byte allocation
+		char *area = (char *)cmemalign( a, 1, amount );	// aligned N-byte allocation
+		if ( area == 0p ) abort( "cmemalign/realloc with align/free out of memory" ); // no storage ?
+		//sout | alignments[a] | area | endl;
+		if ( (size_t)area % a != 0 || malloc_alignment( area ) != a ) { // check for initial alignment
+			abort( "cmemalign/realloc with align/free bad alignment : cmemalign(%d,%d) = %p", (int)a, (int)amount, area );
+		} // if
+		if ( area[0] != '\0' || area[amount - 1] != '\0' ||
+			 area[malloc_usable_size( area ) - 1] != '\0' ||
+			 ! malloc_zero_fill( area ) ) abort( "cmemalign/realloc with align/free corrupt storage1" );
+		area[0] = '\345'; area[amount - 2] = '\345';	// fill first/penultimate byte
+
+		// Do not start this loop index at 0 because realloc of 0 bytes frees the storage.
+		for ( int s = amount; s < 256 * 1024; s += 1 ) { // start at initial memory request
+			if ( area[0] != '\345' || area[s - 2] != '\345' ) abort( "cmemalign/realloc with align/free corrupt storage2" );
+			area = (char *)realloc( area, a * 2, s );	// attempt to reuse storage
+			if ( area == 0p ) abort( "cmemalign/realloc with align/free out of memory" ); // no storage ?
+			//sout | i | area | endl;
+			if ( (size_t)area % a * 2 != 0 || malloc_alignment( area ) != a * 2 ) { // check for initial alignment
+				abort( "cmemalign/realloc with align/free bad alignment %p %jd %jd", area, malloc_alignment( area ), a * 2 );
 			} // if
 			if ( area[s - 1] != '\0' || area[s - 1] != '\0' ||
