Index: tests/alloc.cfa
===================================================================
--- tests/alloc.cfa	(revision dc8511c89e456024f8e634c472b1ebc5d96cc56e)
+++ tests/alloc.cfa	(revision f2d1335e445b79771665d58e1c91dcabab7e7704)
@@ -10,6 +10,6 @@
 // Created On       : Wed Feb  3 07:56:22 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Nov  6 17:50:52 2018
-// Update Count     : 339
+// Last Modified On : Sun Oct 20 21:45:21 2019
+// Update Count     : 391
 //
 
@@ -19,5 +19,5 @@
 #include <stdlib.h>										// posix_memalign
 #include <fstream.hfa>
-#include <stdlib.hfa>										// access C malloc, realloc
+#include <stdlib.hfa>									// access C malloc, realloc
 
 int * foo( int * p, int c ) { return p; }
@@ -27,13 +27,8 @@
 int main( void ) {
 	size_t dim = 10;
-	char fill = '\xff';
-	int * p;
+	char fill = '\xde';
+	int * p, * p1;
 
 	// allocation, non-array types
-
-	// int & r = malloc();
-	// r = 0xdeadbeef;
-	// printf( "C   malloc %#x\n", r );
-	// free( &r );
 
 	p = (int *)malloc( sizeof(*p) );					// C malloc, type unsafe
@@ -52,6 +47,11 @@
 	free( p );
 
-	p = alloc( fill );                                  // CFA alloc, fill
+	p = alloc_set( fill );								// CFA alloc, fill
+	printf( "CFA array alloc, fill %#hhx\n", fill );
 	printf( "CFA alloc, fill %08x\n", *p );
+	free( p );
+
+	p = alloc_set( 3 );									// CFA alloc, fill
+	printf( "CFA alloc, fill %d\n", *p );
 	free( p );
 
@@ -79,9 +79,21 @@
 	free( p );
 
-	p = alloc( 2 * dim, fill );                         // CFA array alloc, fill
+	p = alloc_set( 2 * dim, fill );						// CFA array alloc, fill
 	printf( "CFA array alloc, fill %#hhx\n", fill );
 	for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
 	printf( "\n" );
-	// do not free
+	free( p );
+
+	p = alloc_set( 2 * dim, 0xdeadbeef );				// CFA array alloc, fill
+	printf( "CFA array alloc, fill %#hhx\n", 0xdeadbeef );
+	for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
+	printf( "\n" );
+	// do not free
+
+	p1 = alloc_set( 2 * dim, p );						// CFA array alloc, fill
+	printf( "CFA array alloc, fill from array\n" );
+	for ( i; 2 * dim ) { printf( "%#x %#x, ", p[i], p1[i] ); }
+	free( p1 );
+	printf( "\n" );
 
 
@@ -90,8 +102,8 @@
 
 	p = (int *)realloc( p, dim * sizeof(*p) );			// C realloc
-	for ( i; dim ) { p[i] = 0xdeadbeef; }
-	printf( "C   realloc\n" );
-	for ( i; dim ) { printf( "%#x ", p[i] ); }
-	printf( "\n" );
+	printf( "C realloc\n" );
+	for ( i; dim ) { printf( "%#x ", p[i] ); }
+	printf( "\n" );
+	// do not free
 
 	p = realloc( p, 2 * dim * sizeof(*p) );             // CFA realloc
@@ -108,7 +120,8 @@
 	p = alloc( p, dim );                                // CFA resize array alloc
 	for ( i; dim ) { p[i] = 0xdeadbeef; }
-	printf( "CFA resize alloc\n" );
-	for ( i; dim ) { printf( "%#x ", p[i] ); }
-	printf( "\n" );
+	printf( "CFA resize array alloc\n" );
+	for ( i; dim ) { printf( "%#x ", p[i] ); }
+	printf( "\n" );
+	// do not free
 
 	p = alloc( p, 2 * dim );                            // CFA resize array alloc
@@ -117,26 +130,27 @@
 	for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
 	printf( "\n" );
-
-	p = alloc( p, dim );                                // CFA array alloc
+	// do not free
+
+	p = alloc( p, dim );                                // CFA resize array alloc
 	printf( "CFA resize array alloc\n" );
 	for ( i; dim ) { printf( "%#x ", p[i] ); }
 	printf( "\n" );
-
-	free( p );
-	p = 0;
-
-	p = alloc( p, dim, fill );                          // CFA array alloc, fill
+	// do not free
+
+	p = alloc_set( p, 3 * dim, fill );					// CFA resize array alloc, fill
 	printf( "CFA resize array alloc, fill\n" );
-	for ( i; dim ) { printf( "%#x ", p[i] ); }
-	printf( "\n" );
-
-	p = alloc( p, 2 * dim, fill );                      // CFA array alloc, fill
+	for ( i; 3 * dim ) { printf( "%#x ", p[i] ); }
+	printf( "\n" );
+	// do not free
+
+	p = alloc_set( p, dim, fill );						// CFA resize array alloc, fill
 	printf( "CFA resize array alloc, fill\n" );
-	for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
-	printf( "\n" );
-
-	p = alloc( p, dim, fill );                          // CFA array alloc, fill
+	for ( i; dim ) { printf( "%#x ", p[i] ); }
+	printf( "\n" );
+	// do not free
+
+	p = alloc_set( p, 3 * dim, fill );					// CFA resize array alloc, fill
 	printf( "CFA resize array alloc, fill\n" );
-	for ( i; dim ) { printf( "%#x ", p[i] );; }
+	for ( i; 3 * dim ) { printf( "%#x ", p[i] );; }
 	printf( "\n" );
 	free( p );
@@ -172,17 +186,27 @@
 	free( stp );
 
-	stp = &(*aligned_alloc( Alignment )){ 42, 42.5 };     // CFA aligned_alloc
-	assert( (uintptr_t)stp % Alignment == 0 );
-	printf( "CFA aligned_alloc %d %g\n", stp->x, stp->y );
-	free( stp );
-
-	stp = &(*align_alloc( Alignment )){ 42, 42.5 };       // CFA align_alloc
-	assert( (uintptr_t)stp % Alignment == 0 );
-	printf( "CFA align_alloc %d %g\n", stp->x, stp->y );
-	free( stp );
-
-	stp = align_alloc( Alignment, fill );               // CFA memalign, fill
-	assert( (uintptr_t)stp % Alignment == 0 );
-	printf( "CFA align_alloc fill %#x %a\n", stp->x, stp->y );
+	stp = &(*alloc_align( Alignment)){ 42, 42.5 };		// CFA alloc_align
+	assert( (uintptr_t)stp % Alignment == 0 );
+	printf( "CFA alloc_align %d %g\n", stp->x, stp->y );
+	free( stp );
+
+	stp = &(*alloc_align( Alignment )){ 42, 42.5 };		// CFA alloc_align
+	assert( (uintptr_t)stp % Alignment == 0 );
+	printf( "CFA alloc_align %d %g\n", stp->x, stp->y );
+	free( stp );
+
+	stp = alloc_align_set( Alignment, fill );			// CFA memalign, fill
+	assert( (uintptr_t)stp % Alignment == 0 );
+	printf( "CFA alloc_align fill %#x %a\n", stp->x, stp->y );
+	free( stp );
+
+	stp = alloc_align_set( Alignment, (Struct){ 42, 42.5 } ); // CFA memalign, fill
+	assert( (uintptr_t)stp % Alignment == 0 );
+	printf( "CFA alloc_align fill %d %g\n", stp->x, stp->y );
+	// do not free
+
+	stp = &(*alloc_align( stp, 4096 )){ 42, 42.5 };		// CFA realign
+	assert( (uintptr_t)stp % 4096 == 0 );
+	printf( "CFA alloc_align %d %g\n", stp->x, stp->y );
 	free( stp );
 
@@ -191,16 +215,38 @@
 	printf( "\n" );
 
-	stp = align_alloc( Alignment, dim );                // CFA array memalign
+	stp = alloc_align( Alignment, dim );                // CFA array memalign
 	assert( (uintptr_t)stp % Alignment == 0 );
 	for ( i; dim ) { stp[i] = (Struct){ 42, 42.5 }; }
-	printf( "CFA array align_alloc\n" );
+	printf( "CFA array alloc_align\n" );
 	for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
 	printf( "\n" );
 	free( stp );
 
-	stp = align_alloc( Alignment, dim, fill );          // CFA array memalign, fill
-	assert( (uintptr_t)stp % Alignment == 0 );
-	printf( "CFA array align_alloc, fill\n" );
+	stp = alloc_align_set( Alignment, dim, fill );		// CFA array memalign, fill
+	assert( (uintptr_t)stp % Alignment == 0 );
+	printf( "CFA array alloc_align, fill\n" );
 	for ( i; dim ) { printf( "%#x %a, ", stp[i].x, stp[i].y ); }
+	printf( "\n" );
+	free( stp );
+
+	stp = alloc_align_set( Alignment, dim, (Struct){ 42, 42.5 } ); // CFA array memalign, fill
+	assert( (uintptr_t)stp % Alignment == 0 );
+	printf( "CFA array alloc_align, fill\n" );
+	for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
+	printf( "\n" );
+	// do not free
+
+	stp1 = alloc_align_set( Alignment, dim, stp );		// CFA array memalign, fill
+	assert( (uintptr_t)stp % Alignment == 0 );
+	printf( "CFA array alloc_align, fill array\n" );
+	for ( i; dim ) { printf( "%d %g, ", stp1[i].x, stp1[i].y ); }
+	printf( "\n" );
+	free( stp1 );
+
+	stp = alloc_align( stp, 4096, dim );				// CFA aligned realloc array
+	assert( (uintptr_t)stp % 4096 == 0 );
+	for ( i; dim ) { stp[i] = (Struct){ 42, 42.5 }; }
+	printf( "CFA realloc array alloc_align\n" );
+	for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
 	printf( "\n" );
 	free( stp );
