Index: libcfa/src/heap.cfa
===================================================================
--- libcfa/src/heap.cfa	(revision 19e5d65d29e8005d1f1fbc0f906bd9bb0a80e867)
+++ libcfa/src/heap.cfa	(revision 111a2ab3e38e9a482e065aa6feb44c420adb6b6f)
@@ -10,6 +10,6 @@
 // Created On       : Tue Dec 19 21:58:35 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Apr 24 09:58:01 2022
-// Update Count     : 1146
+// Last Modified On : Mon Apr 25 18:51:36 2022
+// Update Count     : 1147
 //
 
@@ -116,9 +116,10 @@
 
 // statically allocated variables => zero filled.
-size_t __page_size;										// architecture pagesize
-int __map_prot;											// common mmap/mprotect protection
 static size_t heapExpand;								// sbrk advance
 static size_t mmapStart;								// cross over point for mmap
 static unsigned int maxBucketsUsed;						// maximum number of buckets in use
+// extern visibility, used by runtime kernel
+size_t __page_size;										// architecture pagesize
+int __map_prot;											// common mmap/mprotect protection
 
 
@@ -540,5 +541,5 @@
 		// If the size requested is bigger than the current remaining storage, increase the size of the heap.
 
-		size_t increase = ceiling2( size > heapExpand ? size : heapExpand, libAlign() );
+		size_t increase = ceiling2( size > heapExpand ? size : heapExpand, __page_size );
 		// Do not call abort or strerror( errno ) as they may call malloc.
 		if ( sbrk( increase ) == (void *)-1 ) {			// failed, no memory ?
@@ -549,9 +550,9 @@
 
 		// Make storage executable for thunks.
-		// if ( mprotect( (char *)heapEnd + heapRemaining, increase, __map_prot ) ) {
-		// 	unlock( extlock );
-		// 	__cfaabi_bits_print_nolock( STDERR_FILENO, "extend() : internal error, mprotect failure, heapEnd:%p size:%zd, errno:%d.\n", heapEnd, increase, errno );
-		// 	_exit( EXIT_FAILURE );
-		// } // if
+		if ( mprotect( (char *)heapEnd + heapRemaining, increase, __map_prot ) ) {
+			unlock( extlock );
+			__cfaabi_bits_print_nolock( STDERR_FILENO, "extend() : internal error, mprotect failure, heapEnd:%p size:%zd, errno:%d.\n", heapEnd, increase, errno );
+			_exit( EXIT_FAILURE );
+		} // if
 
 		#ifdef __STATISTICS__
@@ -580,4 +581,5 @@
 	// Look up size in the size list.  Make sure the user request includes space for the header that must be allocated
 	// along with the block and is a multiple of the alignment size.
+
 	size_t tsize = size + sizeof(Heap.Storage);
 
@@ -855,5 +857,5 @@
 	// SKULLDUGGERY: insert the offset to the start of the actual storage block and remember alignment
 	fakeHeader->kind.fake.offset = (char *)fakeHeader - (char *)RealHeader;
-	// SKULLDUGGERY: odd alignment imples fake header
+	// SKULLDUGGERY: odd alignment implies fake header
 	fakeHeader->kind.fake.alignment = MarkAlignmentBit( alignment );
 
@@ -1135,5 +1137,5 @@
 	// free(3).
 	int posix_memalign( void ** memptr, size_t alignment, size_t size ) {
-		if ( unlikely( alignment < libAlign() || ! is_pow2( alignment ) ) ) return EINVAL; // check alignment
+	  if ( unlikely( alignment < libAlign() || ! is_pow2( alignment ) ) ) return EINVAL; // check alignment
 		*memptr = memalign( alignment, size );
 		return 0;
@@ -1189,19 +1191,4 @@
 
 
-	// Set the alignment for an the allocation and return previous alignment or 0 if no alignment.
-	// size_t malloc_alignment_set$( void * addr, size_t alignment ) {
-	//   if ( unlikely( addr == 0p ) ) return libAlign();	// minimum alignment
-	// 	size_t ret;
-	// 	Heap.Storage.Header * header = HeaderAddr( addr );
-	// 	if ( (header->kind.fake.alignment & 1) == 1 ) {	// fake header ?
-	// 		ret = header->kind.fake.alignment & -2;		// remove flag from old value
-	// 		header->kind.fake.alignment = alignment | 1; // add flag to new value
-	// 	} else {
-	// 		ret = 0;									// => no alignment to change
-	// 	} // if
-	// 	return ret;
-	// } // malloc_alignment_set$
-
-
 	// Returns true if the allocation is zero filled, e.g., allocated by calloc().
 	bool malloc_zero_fill( void * addr ) {
@@ -1214,16 +1201,4 @@
 	} // malloc_zero_fill
 
-	// Set allocation is zero filled and return previous zero filled.
-	// bool malloc_zero_fill_set$( void * addr ) {
-	//   if ( unlikely( addr == 0p ) ) return false;		// null allocation is not zero fill
-	// 	Heap.Storage.Header * header = HeaderAddr( addr );
-	// 	if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ?
-	// 		header = RealHeader( header );				// backup from fake to real header
-	// 	} // if
-	// 	bool ret = (header->kind.real.blockSize & 2) != 0; // zero filled ?
-	// 	header->kind.real.blockSize |= 2;				// mark as zero filled
-	// 	return ret;
-	// } // malloc_zero_fill_set$
-
 
 	// Returns original total allocation size (not bucket size) => array size is dimension * sizeof(T).
@@ -1236,16 +1211,4 @@
 		return header->kind.real.size;
 	} // malloc_size
-
-	// Set allocation size and return previous size.
-	// size_t malloc_size_set$( void * addr, size_t size ) {
-	//   if ( unlikely( addr == 0p ) ) return 0;			// null allocation has 0 size
-	// 	Heap.Storage.Header * header = HeaderAddr( addr );
-	// 	if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ?
-	// 		header = RealHeader( header );				// backup from fake to real header
-	// 	} // if
-	// 	size_t ret = header->kind.real.size;
-	// 	header->kind.real.size = size;
-	// 	return ret;
-	// } // malloc_size_set$
 
 
