Loading...
--- libmalloc/libmalloc-166.200.60/src/nanov2_zone.h
+++ libmalloc/libmalloc-283.100.5/src/nanov2_zone.h
@@ -29,21 +29,21 @@
#pragma mark -
#pragma mark Address Structure
-#if TARGET_OS_OSX || TARGET_OS_SIMULATOR
+#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
+#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
+#endif // TARGET_OS_OSX || TARGET_OS_SIMULATOR || TARGET_OS_DRIVERKIT
#if NANOV2_REGION_BITS > 0
#define NANOV2_MULTIPLE_REGIONS 1
@@ -155,6 +155,7 @@
// Distinguished values of next_slot
#define SLOT_NULL 0 // Slot has never been used.
+#define SLOT_GUARD 0x7fa // Marks a guard block.
#define SLOT_BUMP 0x7fb // Marks the end of the free list
#define SLOT_FULL 0x7fc // Slot is full (no free slots)
#define SLOT_CAN_MADVISE 0x7fd // Block can be madvised (and in_use == 0)
@@ -238,7 +239,7 @@
// Maximum number of currently active allocation blocks per size class.
// Initially, the default is for each physical CPU to have a dedicated block.
-#define MAX_CURRENT_BLOCKS 16
+#define MAX_CURRENT_BLOCKS 64
#define MAX_CURRENT_BLOCKS_MASK (MAX_CURRENT_BLOCKS - 1)
MALLOC_STATIC_ASSERT(MAX_CURRENT_BLOCKS > 1 &&
!(MAX_CURRENT_BLOCKS & MAX_CURRENT_BLOCKS_MASK),