Loading...
src/magazine_inline.h libmalloc-474.0.13 libmalloc-409.60.6
--- libmalloc/libmalloc-474.0.13/src/magazine_inline.h
+++ libmalloc/libmalloc-409.60.6/src/magazine_inline.h
@@ -210,7 +210,7 @@
 static MALLOC_INLINE uintptr_t
 free_list_gen_checksum(uintptr_t ptr)
 {
-#if defined(__LP64__)
+#if __LP64__
 	uint32_t level1 = (uint32_t)ptr + ((uint32_t)(ptr >> 32));
 #else
 	uint32_t level1 = (uint32_t)ptr;
@@ -276,7 +276,7 @@
 // TODO: this can likely still be faster
 
 #define NYBBLE 4
-#if defined(__LP64__)
+#if __LP64__
 #define ANTI_NYBBLE (64 - NYBBLE)
 #else
 #define ANTI_NYBBLE (32 - NYBBLE)
@@ -392,7 +392,7 @@
 	// Multiplicative hash where the multiplier is a prime near (ULONG_MAX / phi). [phi = 1.618033...]
 	// Since the values of (((uintptr_t)r >> HASH_BLOCKS_ALIGN) are (roughly) an ascending sequence of integers,
 	// this hash works really well. See Knuth TAOCP, Vol. 3.
-#if defined(__LP64__)
+#if __LP64__
 	index = hash_index = (((uintptr_t)r >> HASH_BLOCKS_ALIGN) * 11400714819323198549ULL) >> (64 - shift);
 #else
 	index = hash_index = (((uintptr_t)r >> HASH_BLOCKS_ALIGN) * 2654435761UL) >> (32 - shift);
@@ -424,7 +424,7 @@
 	// Multiplicative hash where the multiplier is a prime near (ULONG_MAX / phi). [phi = 1.618033...]
 	// Since the values of (((uintptr_t)r >> HASH_BLOCKS_ALIGN) are (roughly) an ascending sequence of integers,
 	// this hash works really well. See Knuth TAOCP, Vol. 3.
-#if defined(__LP64__)
+#if __LP64__
 	index = hash_index = (((uintptr_t)r >> HASH_BLOCKS_ALIGN) * 11400714819323198549ULL) >> (64 - shift);
 #else
 	index = hash_index = (((uintptr_t)r >> HASH_BLOCKS_ALIGN) * 2654435761UL) >> (32 - shift);
@@ -488,9 +488,6 @@
 extern unsigned int hyper_shift;
 extern unsigned int phys_ncpus;
 extern unsigned int logical_ncpus;
-#if CONFIG_MAGAZINE_PER_CLUSTER
-extern unsigned int ncpuclusters;
-#endif // CONFIG_MAGAZINE_PER_CLUSTER
 
 static MALLOC_INLINE MALLOC_ALWAYS_INLINE
 unsigned int