Loading...
--- libmalloc/libmalloc-409.81.2/src/nanov2_zone.h
+++ libmalloc/libmalloc-374.120.1/src/nanov2_zone.h
@@ -29,21 +29,21 @@
 #pragma mark -
 #pragma mark Address Structure
 
-#if TARGET_OS_OSX || TARGET_OS_SIMULATOR || MALLOC_TARGET_DK_OSX
+#if TARGET_OS_OSX || TARGET_OS_SIMULATOR || TARGET_OS_DRIVERKIT
 
 #define NANOV2_REGION_BITS		15
 #define NANOV2_ARENA_BITS		3
 #define NANOV2_BLOCK_BITS		12
 #define NANOV2_OFFSET_BITS		14
 
-#else // TARGET_OS_OSX || TARGET_OS_SIMULATOR || MALLOC_TARGET_DK_OSX
+#else // TARGET_OS_OSX || TARGET_OS_SIMULATOR || TARGET_OS_DRIVERKIT
 
 #define NANOV2_REGION_BITS		0
 #define NANOV2_ARENA_BITS		3
 #define NANOV2_BLOCK_BITS		12
 #define NANOV2_OFFSET_BITS		14
 
-#endif // TARGET_OS_OSX || TARGET_OS_SIMULATOR || MALLOC_TARGET_DK_OSX
+#endif // TARGET_OS_OSX || TARGET_OS_SIMULATOR || TARGET_OS_DRIVERKIT
 
 #if NANOV2_REGION_BITS > 0
 #define NANOV2_MULTIPLE_REGIONS	1
@@ -181,10 +181,8 @@
 // Structure overlaid on slots that are on the block freelist.
 typedef struct {
     uint64_t double_free_guard;
-    uint64_t next_slot; // Legal values are <= NEXT_SLOT_VALID_MASK
+    uint16_t next_slot;
 } nanov2_free_slot_t;
-
-#define NEXT_SLOT_VALID_MASK 0x7ff
 
 MALLOC_STATIC_ASSERT(
 		sizeof(nanov2_free_slot_t) <= NANO_REGIME_QUANTA_SIZE,
@@ -260,6 +258,9 @@
 
 	// Locks for the current allocation blocks.
 	_malloc_lock_s		current_block_lock[NANO_SIZE_CLASSES][MAX_CURRENT_BLOCKS];
+
+	// Lock for delegate_allocations.
+	_malloc_lock_s		delegate_allocations_lock;
 
 	// Mask of size classes for which allocation should be delegated when a new
 	// block is needed and the class has become full.