Loading...
--- libmalloc/libmalloc-166.220.1/src/platform.h
+++ libmalloc/libmalloc-116.50.8/src/platform.h
@@ -24,11 +24,11 @@
 #ifndef __PLATFORM_H
 #define __PLATFORM_H
 
-#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
+#if TARGET_OS_EMBEDDED
 #define MALLOC_TARGET_IOS 1
-#else // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
+#else // MALLOC_TARGET_IOS
 #define MALLOC_TARGET_IOS 0
-#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR
+#endif // MALLOC_TARGET_IOS
 
 #ifdef __LP64__
 #define MALLOC_TARGET_64BIT 1
@@ -45,7 +45,7 @@
 
 // <rdar://problem/12596555>
 #if MALLOC_TARGET_IOS
-# define CONFIG_RECIRC_DEPOT 1
+# define CONFIG_RECIRC_DEPOT 0
 # define CONFIG_AGGRESSIVE_MADVISE 1
 #else // MALLOC_TARGET_IOS
 # define CONFIG_RECIRC_DEPOT 1
@@ -57,6 +57,15 @@
 
 // <rdar://problem/19818071>
 #define CONFIG_MADVISE_STYLE MADV_FREE_REUSABLE
+
+// <rdar://problem/13807682>
+#if TARGET_OS_SIMULATOR
+#define CONFIG_OS_LOCK_HANDOFF 1
+#elif MALLOC_TARGET_IOS
+#define CONFIG_OS_LOCK_UNFAIR 1
+#else // MALLOC_TARGET_IOS
+#define CONFIG_OS_LOCK_UNFAIR 1
+#endif // MALLOC_TARGET_IOS
 
 #if MALLOC_TARGET_64BIT
 #define CONFIG_NANOZONE 1
@@ -82,13 +91,9 @@
 
 // <rdar://problem/26823590> compile-time MALLOC_SMALL cut-off size
 #if MALLOC_TARGET_IOS
-#if MALLOC_TARGET_64BIT
-MALLOC_STATIC_ASSERT(PAGE_MAX_SIZE == 16 * 1024, "Expected 16k pages");
-// TODO: rdar://problem/35395572
-#define CONFIG_SMALL_CUTOFF_DYNAMIC 0
-#endif
+#define CONFIG_SMALL_CUTTOFF_127KB 0
 #else
-#define CONFIG_SMALL_CUTOFF_LARGEMEM 1
+#define CONFIG_SMALL_CUTTOFF_127KB 1
 #endif // MALLOC_TARGET_IOS
 
 // memory resource exception handling
@@ -101,11 +106,4 @@
 // presence of commpage memsize
 #define CONFIG_HAS_COMMPAGE_MEMSIZE 1
 
-// presence of commpage number of cpu count
-#define CONFIG_HAS_COMMPAGE_NCPUS 1
-
-// Use of hyper-shift for magazine selection.
-#define CONFIG_TINY_USES_HYPER_SHIFT 0
-#define CONFIG_SMALL_USES_HYPER_SHIFT 0
-
 #endif // __PLATFORM_H