Index: libcfa/src/heap.cfa
===================================================================
--- libcfa/src/heap.cfa	(revision 70cab4315819e6026deee69e49b58c9575cff047)
+++ libcfa/src/heap.cfa	(revision c86f587aed5a7bb7729c3421d31b270e598797ea)
@@ -10,6 +10,6 @@
 // Created On       : Tue Dec 19 21:58:35 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Aug 24 20:29:24 2020
-// Update Count     : 926
+// Last Modified On : Tue Sep  1 21:58:36 2020
+// Update Count     : 927
 //
 
@@ -1218,13 +1218,4 @@
 	#endif // __STATISTICS__
 
-	// If size is equal to 0, either NULL or a pointer suitable to be passed to free() is returned.
-  if ( unlikely( size == 0 ) ) { free( oaddr ); return 0p; } // special cases
-  if ( unlikely( oaddr == 0p ) ) {
-		#ifdef __STATISTICS__
-		__atomic_add_fetch( &resize_storage, size, __ATOMIC_SEQ_CST );
-		#endif // __STATISTICS__
-		return memalignNoStats( nalign, size );
-	} // if
-
 	if ( unlikely( nalign < libAlign() ) ) nalign = libAlign(); // reset alignment to minimum
 	#ifdef __CFA_DEBUG__
@@ -1232,4 +1223,13 @@
 		checkAlign( nalign );							// check alignment
 	#endif // __CFA_DEBUG__
+
+	// If size is equal to 0, either NULL or a pointer suitable to be passed to free() is returned.
+  if ( unlikely( size == 0 ) ) { free( oaddr ); return 0p; } // special cases
+  if ( unlikely( oaddr == 0p ) ) {
+		#ifdef __STATISTICS__
+		__atomic_add_fetch( &resize_storage, size, __ATOMIC_SEQ_CST );
+		#endif // __STATISTICS__
+		return memalignNoStats( nalign, size );
+	} // if
 
 	HeapManager.Storage.Header * header;
@@ -1267,4 +1267,14 @@
 	#endif // __CFA_DEBUG__
 
+	// If size is equal to 0, either NULL or a pointer suitable to be passed to free() is returned.
+  if ( unlikely( size == 0 ) ) { free( oaddr ); return 0p; } // special cases
+  if ( unlikely( oaddr == 0p ) ) {
+		#ifdef __STATISTICS__
+		__atomic_add_fetch( &realloc_calls, 1, __ATOMIC_SEQ_CST );
+		__atomic_add_fetch( &realloc_storage, size, __ATOMIC_SEQ_CST );
+		#endif // __STATISTICS__
+		return memalignNoStats( nalign, size );
+	} // if
+
 	HeapManager.Storage.Header * header;
 	HeapManager.FreeHeader * freeElem;
@@ -1286,8 +1296,4 @@
 	#endif // __STATISTICS__
 
-	// If size is equal to 0, either NULL or a pointer suitable to be passed to free() is returned.
-  if ( unlikely( size == 0 ) ) { free( oaddr ); return 0p; } // special cases
-  if ( unlikely( oaddr == 0p ) ) return memalignNoStats( nalign, size );
-
 	size_t osize = header->kind.real.size;				// old allocation size
 	bool ozfill = (header->kind.real.blockSize & 2) != 0; // old allocation zero filled
