Loading...
--- libmalloc/libmalloc-374.120.1/src/pgm_malloc.c
+++ libmalloc/libmalloc-374.40.6/src/pgm_malloc.c
@@ -1113,7 +1113,7 @@
return true;
}
-#if TARGET_OS_WATCH || TARGET_OS_TV
+#if TARGET_OS_WATCH
static bool
is_high_memory_device(void)
{
@@ -1131,14 +1131,12 @@
if (FEATURE_FLAG(ProbGuard, true) && should_activate(internal_build)) {
#if TARGET_OS_OSX || TARGET_OS_IOS
return true;
-#elif TARGET_OS_WATCH || TARGET_OS_TV
- if (is_high_memory_device()) {
+#elif TARGET_OS_TV
+ if (internal_build) {
return true;
}
-#elif TARGET_OS_DRIVERKIT
- // Never enable for DriverKit
-#else
- if (internal_build) {
+#elif TARGET_OS_WATCH
+ if (internal_build && is_high_memory_device()) {
return true;
}
#endif
@@ -1200,7 +1198,7 @@
// Approximate a (1 / sample_rate) chance for sampling; 1 means "always sample".
zone->sample_counter_range = (sample_rate != 1) ? (2 * sample_rate) : 1;
bool strict_alignment = env_var("MallocProbGuardStrictAlignment") ? env_bool("MallocProbGuardStrictAlignment") : FEATURE_FLAG(ProbGuardStrictAlignment, false);
- zone->min_alignment = (strict_alignment && MALLOC_TARGET_64BIT) ? 1 : 16; // Darwin ABI requires 16 byte alignment.
+ zone->min_alignment = strict_alignment ? 1 : 16; // Darwin ABI requires 16 byte alignment.
zone->signal_handler = env_bool("MallocProbGuardSignalHandler");
zone->debug = env_bool("MallocProbGuardDebug");
zone->debug_log_throttle_ms = env_uint("MallocProbGuardDebugLogThrottleInMillis", 1000);