Loading...
--- libmalloc/libmalloc-792.60.6/tests/perf_contended_malloc_free.c
+++ libmalloc/libmalloc-646.40.3/tests/perf_contended_malloc_free.c
@@ -13,12 +13,9 @@
#include <sys/sysctl.h>
#include <mach/mach.h>
#include <perfcheck_keys.h>
-typedef unsigned seed_type_t;
-#else
-typedef unsigned long seed_type_t;
#endif // !MALLOC_TARGET_EXCLAVES
-T_GLOBAL_META(T_META_TAG_PERF, T_META_TAG_ALL_ALLOCATORS, T_META_TAG_VM_NOT_PREFERRED);
+T_GLOBAL_META(T_META_TAG_PERF, T_META_TAG_XZONE, T_META_TAG_VM_NOT_PREFERRED);
// number of times malloc & free are called per dt_stat batch
#define ITERATIONS_PER_DT_STAT_BATCH 10000ull
@@ -39,7 +36,7 @@
#pragma mark -
static uint64_t
-random_busy_counts(seed_type_t *seed, uint64_t *first, uint64_t *second)
+random_busy_counts(unsigned int *seed, uint64_t *first, uint64_t *second)
{
uint64_t random = rand_r(seed);
*first = 0x4 + (random & (0x10 - 1));
@@ -293,7 +290,7 @@
{
kern_return_t kr;
int r;
- seed_type_t seed;
+ unsigned int seed;
volatile double dummy;
uint64_t pos, remaining_frees;
void *alloc;
@@ -498,7 +495,7 @@
}
// rdar://100479142
-#if CONFIG_MAGAZINE_DEFERRED_RECLAIM || CONFIG_XZM_DEFERRED_RECLAIM
+#if CONFIG_DEFERRED_RECLAIM
// If deferred reclaim is available but not enabled by default, test it too
T_DECL(perf_contended_large_deferred_reclaim_bench,
@@ -514,4 +511,4 @@
malloc_bench(false, 16 * 1024, 256 * 1024, 16 * 1024);
}
-#endif // CONFIG_MAGAZINE_DEFERRED_RECLAIM || CONFIG_XZM_DEFERRED_RECLAIM
+#endif // CONFIG_DEFERRED_RECLAIM