Loading...
--- libmalloc/libmalloc-646.0.13/tests/xzone_bitmap.c
+++ libmalloc/libmalloc-521.120.7/tests/xzone_bitmap.c
@@ -262,6 +262,7 @@
 	chunk->xzc_free = _xzm_xzone_free_mask(NULL, chunk_capacity);
 	chunk->xzc_used = 0;
 	chunk->xzc_bits.xzcb_kind = XZM_SLICE_KIND_SMALL_CHUNK;
+	chunk->xzc_bits.xzcb_has_aligned = false;
 	chunk->xzc_bits.xzcb_is_pristine = true;
 	chunk->xzc_bits.xzcb_enqueued = false;
 	chunk->xzcs_slice_count = slice_count;
@@ -284,10 +285,10 @@
 	xzm_chunk_t chunk = &chunks[chunk_idx];
 
 	/*
-	 * slice: |<-16KiB->|<-16KiB->|<-16KiB->|<-16KiB->|
-	 * block: |<-14KiB>|<-14KiB>|<-14KiB>|<-14KiB>|
-	 * free:  |    0   |   1    |   1    |   0    |
-	 * vm op: |    0   |   1    |   1    |   0    |
+	 * slice: |<-16KiB->|<-16KiB->|<-16KiB->|<-16KiB->|<-16KiB->|<-16KiB->|<-16KiB->|<-16KiB->|
+	 * block: |<-14KiB>|<-14KiB>|<-14KiB>|<-14KiB>|<14KiB->|<14KiB->|<14KiB->|<14KiB->|<14KiB->|
+	 * free:  |    1   |    0   |    1   |    0   |   1    |   1    |   0    |   1    |   0    |
+	 * vm op: |    0   |    0   |    0   |    0   |   1    |   1    |   0    |   0    |   0    |
 	 */
 	puts("Checking block size smaller than slice size...");
 	{
@@ -296,8 +297,9 @@
 				"Block smaller than slice size");
 		const uint32_t chunk_capacity = XZM_SMALL_CHUNK_SIZE / block_size;
 		chunk_init(chunks, slice_count, chunk_capacity);
-		chunk->xzc_free = _xzm_xzone_free_mask(NULL, chunk_capacity) & 0b0110;
-		const expected_t expected[] = {{0, 0}, {1, 1}, {1, 1},  {0, 0}};
+		chunk->xzc_free = _xzm_xzone_free_mask(NULL, chunk_capacity) & 0b010110101;
+		const expected_t expected[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0},
+				{4, 1}, {4, 1},  {0, 0}, {0, 0}, {0, 0}};
 		_Static_assert(countof(expected) == chunk_capacity,
 				"Correct number of expected results");
 		for (xzm_block_index_t idx = 0; idx < chunk_capacity; ++idx) {
@@ -323,10 +325,10 @@
 	}
 
 	/*
-	 * slice: |<16KiB>|<16KiB>|<16KiB>|<16KiB>|
-	 * block: |<16KiB>|<16KiB>|<16KiB>|<16KiB>|
-	 * free:  |   1   |   0   |   1   |   0   |
-	 * vm op: |   1   |   0   |   1   |   0   |
+	 * slice: |<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|
+	 * block: |<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|
+	 * free:  |   1   |   0   |   1   |   0   |   1   |   0   |   1   |   0   |
+	 * vm op: |   1   |   0   |   1   |   0   |   1   |   0   |   1   |   0   |
 	 */
 	puts("Checking block size equal to slice size...");
 	{
@@ -335,8 +337,9 @@
 				"Block equal to slice size");
 		const uint32_t chunk_capacity = XZM_SMALL_CHUNK_SIZE / block_size;
 		chunk_init(chunks, slice_count, chunk_capacity);
-		chunk->xzc_free = _xzm_xzone_free_mask(NULL, chunk_capacity) & 0b0101;
-		const expected_t expected[] = {{0, 1}, {0, 0}, {2, 1}, {0, 0}};
+		chunk->xzc_free = _xzm_xzone_free_mask(NULL, chunk_capacity) & 0b01010101;
+		const expected_t expected[] = {{0, 1}, {0, 0}, {2, 1}, {0, 0},
+				{4, 1}, {0, 0},  {6, 1}, {0, 0}};
 		_Static_assert(countof(expected) == chunk_capacity,
 				"Correct number of expected results");
 		for (xzm_block_index_t idx = 0; idx < chunk_capacity; ++idx) {
@@ -362,10 +365,10 @@
 	}
 
 	/*
-	 * slice: |<16KiB>|<16KiB>|<16KiB>|<16KiB>|
-	 * block: |<-20KiB->|<-20KiB->|<-20KiB->|
-	 * free:  |    1    |    0    |    1    |
-	 * vm op: |    1    |    0    |    1    |
+	 * slice: |<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|<16KiB>|
+	 * block: |<-20KiB->|<-20KiB->|<-20KiB->|<-20KiB->|<-20KiB->|<-20KiB->|
+	 * free:  |    1    |    0    |    1    |    0    |    1    |    0    |
+	 * vm op: |    1    |    0    |    0    |    0    |    1    |    0    |
 	 */
 	puts("Checking block size greater than slice size...");
 	{
@@ -374,8 +377,9 @@
 				"Block greater than slice size");
 		const uint32_t chunk_capacity = XZM_SMALL_CHUNK_SIZE / block_size;
 		chunk_init(chunks, slice_count, chunk_capacity);
-		chunk->xzc_free = _xzm_xzone_free_mask(NULL, chunk_capacity) & 0b101;
-		const expected_t expected[] = {{0, 1}, {0, 0}, {3, 1}};
+		chunk->xzc_free = _xzm_xzone_free_mask(NULL, chunk_capacity) & 0b010101;
+		const expected_t expected[] = {{0, 1}, {0, 0}, {0, 0}, {0, 0},
+				{5, 1}, {0, 0}};
 		_Static_assert(countof(expected) == chunk_capacity,
 				"Correct number of expected results");
 		for (xzm_block_index_t idx = 0; idx < chunk_capacity; ++idx) {