From e54d414bfbee0b3f5e6aa73c514dd7034fbdebaf Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Sat, 23 Jun 2018 21:01:15 +0100 Subject: [PATCH] No need for separate ams and lo formats. Copied from Perforce Change: 194133 --- mps/test/conerr/64.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mps/test/conerr/64.c b/mps/test/conerr/64.c index 616f12bf8ad..1a5ccd43af2 100644 --- a/mps/test/conerr/64.c +++ b/mps/test/conerr/64.c @@ -23,7 +23,7 @@ static void test(void) mps_pool_t pool_ams, pool_lo; mps_thr_t thread; mps_root_t root; - mps_fmt_t fmt_ams, fmt_lo; + mps_fmt_t fmt; mps_ap_t ap_ams, ap_lo; mps_addr_t p, q, out_of_bounds; size_t header = sizeof(mycell); @@ -35,15 +35,14 @@ static void test(void) MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FMT_HEADER_SIZE, header); fmtargs(args + 1); - cdie(mps_fmt_create_k(&fmt_lo, arena, args), "lo format"); + cdie(mps_fmt_create_k(&fmt, arena, args), "lo format"); } MPS_ARGS_END(args); - cdie(mps_fmt_create_A(&fmt_ams, arena, &fmtA), "ams format"); MPS_ARGS_BEGIN(args) { - MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt_ams); + MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt); cdie(mps_pool_create_k(&pool_ams, arena, mps_class_ams(), args), "ams pool"); } MPS_ARGS_END(args); MPS_ARGS_BEGIN(args) { - MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt_lo); + MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt); cdie(mps_pool_create_k(&pool_lo, arena, mps_class_lo(), args), "lo pool"); } MPS_ARGS_END(args); cdie(mps_ap_create(&ap_ams, pool_ams, mps_rank_exact()), "ams ap"); @@ -57,7 +56,7 @@ static void test(void) /* q is in the AMS pool with exact reference to p and out-of-bounds object */ out_of_bounds = (void *)((char*)p - header); - q = allocone(ap_ams, 1, p, out_of_bounds, sizeof(mycell)); + q = allocheader(ap_ams, 1, p, out_of_bounds, sizeof(mycell), header); mps_arena_start_collect(arena); mps_arena_park(arena); @@ -68,8 +67,7 @@ static void test(void) mps_ap_destroy(ap_ams); mps_pool_destroy(pool_lo); mps_pool_destroy(pool_ams); - mps_fmt_destroy(fmt_lo); - mps_fmt_destroy(fmt_ams); + mps_fmt_destroy(fmt); mps_root_destroy(root); mps_thread_dereg(thread); mps_arena_destroy(arena);