+/*
+ * this function implements the same logic as dyld's "dyld_fall_2020_os_versions"
+ * from dyld_priv.h. this way we can consistently deny / allow allocations based
+ * on SDK version at fall 2020 level. Compare output to proc_sdk(current_proc())
+ */
+static uint32_t
+proc_2020_fall_os_sdk(void)
+{
+ switch (current_proc()->p_platform) {
+ case PLATFORM_MACOS:
+ return 0x000a1000; // DYLD_MACOSX_VERSION_10_16
+ case PLATFORM_IOS:
+ case PLATFORM_IOSSIMULATOR:
+ case PLATFORM_MACCATALYST:
+ return 0x000e0000; // DYLD_IOS_VERSION_14_0
+ case PLATFORM_BRIDGEOS:
+ return 0x00050000; // DYLD_BRIDGEOS_VERSION_5_0
+ case PLATFORM_TVOS:
+ case PLATFORM_TVOSSIMULATOR:
+ return 0x000e0000; // DYLD_TVOS_VERSION_14_0
+ case PLATFORM_WATCHOS:
+ case PLATFORM_WATCHOSSIMULATOR:
+ return 0x00070000; // DYLD_WATCHOS_VERSION_7_0
+ default:
+ return 0;
+ }
+}
+