Loading...
--- libmalloc/libmalloc-792.60.6/tests/pgm_allocator.c
+++ libmalloc/libmalloc-715.100.22/tests/pgm_allocator.c
@@ -12,8 +12,7 @@
#include <darwintest.h>
-T_GLOBAL_META(T_META_RUN_CONCURRENTLY(TRUE), T_META_NAMESPACE("pgm"),
- T_META_TAG_VM_PREFERRED, T_META_TAG_NO_ALLOCATOR_OVERRIDE);
+T_GLOBAL_META(T_META_RUN_CONCURRENTLY(TRUE), T_META_NAMESPACE("pgm"));
// Use weird page size to expose implicit assumptions and help prevent issues
// caused by different page sizes on macOS and iOS.
@@ -26,7 +25,7 @@
#pragma mark -
#pragma mark Allocator Functions
-T_DECL(lookup_size, "lookup_size")
+T_DECL(lookup_size, "lookup_size", T_META_TAG_VM_PREFERRED)
{
zone.begin = 640000; zone.end = 650240; // lookup_slot
slots[0] = (slot_t){
@@ -43,7 +42,7 @@
T_EXPECT_EQ(lookup_size(&zone, 641031), 0ul, "freed block address");
}
-T_DECL(allocate, "allocate")
+T_DECL(allocate, "allocate", T_META_TAG_VM_PREFERRED)
{
T_EXPECT_NULL(allocate(&zone, 5, 16), "zone full");
@@ -75,7 +74,7 @@
T_EXPECT_EQ(zone.max_size_in_use, 55ul, "max_size_in_use is high water mark");
}
-T_DECL(deallocate, "deallocate")
+T_DECL(deallocate, "deallocate", T_META_TAG_VM_PREFERRED)
{
zone.begin = 640000; zone.end = 650240; // lookup_slot
slots[0] = (slot_t){
@@ -106,7 +105,7 @@
// TODO(yln): test for reallocate with bad ptr
-T_DECL(reallocate_guarded_to_sampled, "reallocate: guarded -> sampled")
+T_DECL(reallocate_guarded_to_sampled, "reallocate: guarded -> sampled", T_META_TAG_VM_PREFERRED)
{
zone.begin = 640000; zone.end = 650240; // is_guarded
slots[0] = (slot_t){ .state = ss_allocated, .metadata = 1, .size = 5 }; // lookup_size
@@ -127,7 +126,7 @@
T_EXPECT_EQ((unsigned int)(slots[1].state), ss_allocated, "destination slot");
}
-T_DECL(reallocate_unguarded_to_sampled, "reallocate: unguarded -> sampled")
+T_DECL(reallocate_unguarded_to_sampled, "reallocate: unguarded -> sampled", T_META_TAG_VM_PREFERRED)
{
expected_size_ptr = 1337; size_ret_value = 5; // wrapped_size
zone.max_allocations = 2; // is_full
@@ -145,7 +144,7 @@
T_EXPECT_EQ((unsigned int)(slots[0].state), ss_allocated, "destination slot");
}
-T_DECL(reallocate_guarded_to_unsampled, "reallocate: guarded -> unsampled")
+T_DECL(reallocate_guarded_to_unsampled, "reallocate: guarded -> unsampled", T_META_TAG_VM_PREFERRED)
{
zone.begin = 640000; zone.end = 650240; // is_guarded
slots[0] = (slot_t){ .state = ss_allocated, .metadata = 1, .size = 5 }; // lookup_size
@@ -160,7 +159,7 @@
T_EXPECT_EQ((unsigned int)(slots[0].state), ss_freed, "source slot");
}
-T_DECL(reallocate_guarded_to_unsampled_zone_full, "reallocate: guarded -> unsampled (zone full)")
+T_DECL(reallocate_guarded_to_unsampled_zone_full, "reallocate: guarded -> unsampled (zone full)", T_META_TAG_VM_PREFERRED)
{
zone.begin = 640000; zone.end = 650240; // is_guarded
slots[0] = (slot_t){ .state = ss_allocated, .metadata = 1, .size = 5 }; // lookup_size