diff --git a/mps/code/amcss.c b/mps/code/amcss.c index 2efea609853..bc0d8861149 100644 --- a/mps/code/amcss.c +++ b/mps/code/amcss.c @@ -125,7 +125,8 @@ static void test_stepper(mps_addr_t object, mps_fmt_t fmt, mps_pool_t pool, /* test -- the body of the test */ -static void test(mps_arena_t arena, mps_class_t pool_class, size_t roots_count) +static void test(mps_arena_t arena, mps_pool_class_t pool_class, + size_t roots_count) { mps_fmt_t format; mps_chain_t chain; diff --git a/mps/code/amcsshe.c b/mps/code/amcsshe.c index 0e37cb62b26..fec9fb3a677 100644 --- a/mps/code/amcsshe.c +++ b/mps/code/amcsshe.c @@ -97,7 +97,8 @@ static void report(mps_arena_t arena) /* test -- the body of the test */ -static void *test(mps_arena_t arena, mps_class_t pool_class, size_t roots_count) +static void *test(mps_arena_t arena, mps_pool_class_t pool_class, + size_t roots_count) { mps_fmt_t format; mps_chain_t chain; diff --git a/mps/code/amsss.c b/mps/code/amsss.c index 915c8ed1522..4e1e15814f7 100644 --- a/mps/code/amsss.c +++ b/mps/code/amsss.c @@ -108,7 +108,7 @@ static mps_addr_t make(void) static mps_pool_debug_option_s freecheckOptions = { NULL, 0, "Dead", 4 }; -static void test_pool(mps_class_t pool_class, mps_arg_s args[], +static void test_pool(mps_pool_class_t pool_class, mps_arg_s args[], mps_bool_t haveAmbiguous) { mps_pool_t pool; diff --git a/mps/code/apss.c b/mps/code/apss.c index 7de122af10d..89604831dcf 100644 --- a/mps/code/apss.c +++ b/mps/code/apss.c @@ -57,7 +57,8 @@ static void check_allocated_size(mps_pool_t pool, mps_ap_t ap, size_t allocated) static mps_res_t stress(mps_arena_t arena, mps_pool_debug_option_s *options, mps_align_t align, size_t (*size)(size_t i, mps_align_t align), - const char *name, mps_class_t class, mps_arg_s args[]) + const char *name, mps_pool_class_t pool_class, + mps_arg_s args[]) { mps_res_t res = MPS_RES_OK; mps_pool_t pool; @@ -70,7 +71,7 @@ static mps_res_t stress(mps_arena_t arena, mps_pool_debug_option_s *options, printf("stress %s\n", name); - die(mps_pool_create_k(&pool, arena, class, args), "pool_create"); + die(mps_pool_create_k(&pool, arena, pool_class, args), "pool_create"); die(mps_ap_create(&ap, pool, mps_rank_exact()), "BufferCreate"); /* allocate a load of objects */ diff --git a/mps/code/djbench.c b/mps/code/djbench.c index 9379a259669..abb4329313b 100644 --- a/mps/code/djbench.c +++ b/mps/code/djbench.c @@ -166,7 +166,7 @@ static void watch(dj_t dj, const char *name) /* Wrap a call to dj benchmark that doesn't require MPS setup */ -static void wrap(dj_t dj, mps_class_t dummy, const char *name) +static void wrap(dj_t dj, mps_pool_class_t dummy, const char *name) { (void)dummy; pool = NULL; @@ -176,7 +176,7 @@ static void wrap(dj_t dj, mps_class_t dummy, const char *name) /* Wrap a call to a dj benchmark that requires MPS setup */ -static void arena_wrap(dj_t dj, mps_class_t pool_class, const char *name) +static void arena_wrap(dj_t dj, mps_pool_class_t pool_class, const char *name) { MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, arena_size); @@ -213,16 +213,16 @@ static struct option longopts[] = { /* Test definitions. */ -static mps_class_t dummy_class(void) +static mps_pool_class_t dummy_class(void) { return NULL; } static struct { const char *name; - void (*wrap)(dj_t, mps_class_t, const char *name); + void (*wrap)(dj_t, mps_pool_class_t, const char *name); dj_t dj; - mps_class_t (*pool_class)(void); + mps_pool_class_t (*pool_class)(void); } pools[] = { {"mvt", arena_wrap, dj_reserve, mps_class_mvt}, {"mvff", arena_wrap, dj_reserve, mps_class_mvff}, diff --git a/mps/code/eventrep.c b/mps/code/eventrep.c index e60d81334dc..4d4aee92918 100644 --- a/mps/code/eventrep.c +++ b/mps/code/eventrep.c @@ -1,5 +1,5 @@ /* eventrep.c: Allocation replayer routines - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. * * $Id$ */ @@ -242,7 +242,8 @@ static void objRemove(void **objReturn, objectTable table, /* poolRecreate -- create and record a pool */ -static void poolRecreate(void *logPool, void *logArena, mps_class_t class, +static void poolRecreate(void *logPool, void *logArena, + mps_pool_class_t pool_class, poolSupport support, int bufferClassLevel, ...) { va_list args; @@ -650,7 +651,7 @@ void EventRepFinish(void) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/finaltest.c b/mps/code/finaltest.c index 1c25de2510b..9f3ef13b967 100644 --- a/mps/code/finaltest.c +++ b/mps/code/finaltest.c @@ -215,7 +215,7 @@ static void test_trees(int mode, const char *name, mps_arena_t arena, } static void test_pool(int mode, mps_arena_t arena, mps_chain_t chain, - mps_class_t pool_class) + mps_pool_class_t pool_class) { mps_ap_t ap; mps_fmt_t fmt; diff --git a/mps/code/gcbench.c b/mps/code/gcbench.c index 0f02f8040db..a23745b41c8 100644 --- a/mps/code/gcbench.c +++ b/mps/code/gcbench.c @@ -224,7 +224,7 @@ static void watch(gcthread_fn_t fn, const char *name) /* Setup MPS arena and call benchmark. */ static void arena_setup(gcthread_fn_t fn, - mps_class_t pool_class, + mps_pool_class_t pool_class, const char *name) { MPS_ARGS_BEGIN(args) { @@ -281,7 +281,7 @@ static struct option longopts[] = { static struct { const char *name; gcthread_fn_t fn; - mps_class_t (*pool_class)(void); + mps_pool_class_t (*pool_class)(void); } pools[] = { {"amc", gc_tree, mps_class_amc}, {"ams", gc_tree, mps_class_ams}, diff --git a/mps/code/mpmss.c b/mps/code/mpmss.c index e3914be9d93..4be28def7ca 100644 --- a/mps/code/mpmss.c +++ b/mps/code/mpmss.c @@ -38,7 +38,7 @@ static void check_allocated_size(mps_pool_t pool, size_t allocated) static mps_res_t stress(mps_arena_t arena, mps_pool_debug_option_s *options, size_t (*size)(size_t i), mps_align_t align, - const char *name, mps_class_t pool_class, + const char *name, mps_pool_class_t pool_class, mps_arg_s *args) { mps_res_t res; diff --git a/mps/code/mpmst.h b/mps/code/mpmst.h index 2dd1358ca01..ac59492bea5 100644 --- a/mps/code/mpmst.h +++ b/mps/code/mpmst.h @@ -48,7 +48,7 @@ #define PoolClassSig ((Sig)0x519C7A55) /* SIGnature pool CLASS */ -typedef struct mps_class_s { +typedef struct mps_pool_class_s { ProtocolClassStruct protocol; const char *name; /* class name string */ size_t size; /* size of outer structure */ diff --git a/mps/code/mpmtypes.h b/mps/code/mpmtypes.h index 144ad6399ed..4c0b6bd9c87 100644 --- a/mps/code/mpmtypes.h +++ b/mps/code/mpmtypes.h @@ -75,7 +75,7 @@ typedef unsigned FrameState; /* */ typedef struct mps_fmt_s *Format; /* design.mps.format */ typedef struct LockStruct *Lock; /* * */ typedef struct mps_pool_s *Pool; /* */ -typedef struct mps_class_s *PoolClass; /* */ +typedef struct mps_pool_class_s *PoolClass; /* */ typedef PoolClass AbstractPoolClass; /* */ typedef PoolClass AbstractBufferPoolClass; /* */ typedef PoolClass AbstractSegBufPoolClass; /* */ diff --git a/mps/code/mps.h b/mps/code/mps.h index 758c1b389b4..78f46640f49 100644 --- a/mps/code/mps.h +++ b/mps/code/mps.h @@ -51,7 +51,8 @@ typedef struct mps_pool_s *mps_pool_t; /* pool */ typedef struct mps_chain_s *mps_chain_t; /* chain */ typedef struct mps_fmt_s *mps_fmt_t; /* object format */ typedef struct mps_root_s *mps_root_t; /* root */ -typedef struct mps_class_s *mps_class_t; /* pool class */ +typedef struct mps_pool_class_s *mps_pool_class_t; /* pool class */ +typedef mps_pool_class_t mps_class_t; /* deprecated alias */ typedef struct mps_thr_s *mps_thr_t; /* thread registration */ typedef struct mps_ap_s *mps_ap_t; /* allocation point */ typedef struct mps_ld_s *mps_ld_t; /* location dependency */ @@ -472,11 +473,11 @@ extern void mps_fmt_destroy(mps_fmt_t); /* Pools */ extern mps_res_t mps_pool_create(mps_pool_t *, mps_arena_t, - mps_class_t, ...); + mps_pool_class_t, ...); extern mps_res_t mps_pool_create_v(mps_pool_t *, mps_arena_t, - mps_class_t, va_list); + mps_pool_class_t, va_list); extern mps_res_t mps_pool_create_k(mps_pool_t *, mps_arena_t, - mps_class_t, mps_arg_s []); + mps_pool_class_t, mps_arg_s []); extern void mps_pool_destroy(mps_pool_t); extern size_t mps_pool_total_size(mps_pool_t); extern size_t mps_pool_free_size(mps_pool_t); diff --git a/mps/code/mpscamc.h b/mps/code/mpscamc.h index 710eea2f261..c02261dffe8 100644 --- a/mps/code/mpscamc.h +++ b/mps/code/mpscamc.h @@ -1,7 +1,7 @@ /* mpscamc.h: MEMORY POOL SYSTEM CLASS "AMC" * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpscamc_h @@ -9,8 +9,8 @@ #include "mps.h" -extern mps_class_t mps_class_amc(void); -extern mps_class_t mps_class_amcz(void); +extern mps_pool_class_t mps_class_amc(void); +extern mps_pool_class_t mps_class_amcz(void); typedef void (*mps_amc_apply_stepper_t)(mps_addr_t, void *, size_t); extern void mps_amc_apply(mps_pool_t, mps_amc_apply_stepper_t, @@ -21,7 +21,7 @@ extern void mps_amc_apply(mps_pool_t, mps_amc_apply_stepper_t, /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpscams.h b/mps/code/mpscams.h index 5c1cc1b6f8f..dc5d9fdf688 100644 --- a/mps/code/mpscams.h +++ b/mps/code/mpscams.h @@ -1,7 +1,7 @@ /* mpscams.h: MEMORY POOL SYSTEM CLASS "AMS" * * $Id$ - * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. * Portions copyright (C) 2002 Global Graphics Software. */ @@ -14,15 +14,15 @@ extern const struct mps_key_s _mps_key_ams_support_ambiguous; #define MPS_KEY_AMS_SUPPORT_AMBIGUOUS (&_mps_key_ams_support_ambiguous) #define MPS_KEY_AMS_SUPPORT_AMBIGUOUS_FIELD b -extern mps_class_t mps_class_ams(void); -extern mps_class_t mps_class_ams_debug(void); +extern mps_pool_class_t mps_class_ams(void); +extern mps_pool_class_t mps_class_ams_debug(void); #endif /* mpscams_h */ /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpscawl.h b/mps/code/mpscawl.h index 4c0af1fb17e..a449d0ecd26 100644 --- a/mps/code/mpscawl.h +++ b/mps/code/mpscawl.h @@ -1,7 +1,7 @@ /* mpscaawl.h: MEMORY POOL SYSTEM CLASS "AWL" * * $Id$ - * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpscawl_h @@ -13,7 +13,7 @@ extern const struct mps_key_s _mps_key_awl_find_dependent; #define MPS_KEY_AWL_FIND_DEPENDENT (&_mps_key_awl_find_dependent) #define MPS_KEY_AWL_FIND_DEPENDENT_FIELD addr_method -extern mps_class_t mps_class_awl(void); +extern mps_pool_class_t mps_class_awl(void); typedef mps_addr_t (*mps_awl_find_dependent_t)(mps_addr_t addr); @@ -22,7 +22,7 @@ typedef mps_addr_t (*mps_awl_find_dependent_t)(mps_addr_t addr); /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpsclo.h b/mps/code/mpsclo.h index 15813bbfdef..1e1681009de 100644 --- a/mps/code/mpsclo.h +++ b/mps/code/mpsclo.h @@ -2,7 +2,7 @@ * * $Id$ * - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpsclo_h @@ -10,14 +10,14 @@ #include "mps.h" -extern mps_class_t mps_class_lo(void); +extern mps_pool_class_t mps_class_lo(void); #endif /* mpsclo_h */ /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpscmfs.h b/mps/code/mpscmfs.h index cc0a411260b..1a2dd875522 100644 --- a/mps/code/mpscmfs.h +++ b/mps/code/mpscmfs.h @@ -1,7 +1,7 @@ /* mpscamfs.h: MEMORY POOL SYSTEM CLASS "MFS" * * $Id$ - * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpscmfs_h @@ -13,14 +13,14 @@ extern const struct mps_key_s _mps_key_mfs_unit_size; #define MPS_KEY_MFS_UNIT_SIZE (&_mps_key_mfs_unit_size) #define MPS_KEY_MFS_UNIT_SIZE_FIELD size -extern mps_class_t mps_class_mfs(void); +extern mps_pool_class_t mps_class_mfs(void); #endif /* mpscmfs_h */ /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpscmv.h b/mps/code/mpscmv.h index 5c6522ae1e9..871ab7d4f63 100644 --- a/mps/code/mpscmv.h +++ b/mps/code/mpscmv.h @@ -1,7 +1,7 @@ /* mpscmv.h: MEMORY POOL SYSTEM CLASS "MV" * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpscmv_h @@ -12,15 +12,15 @@ #define mps_mv_free_size mps_pool_free_size #define mps_mv_size mps_pool_total_size -extern mps_class_t mps_class_mv(void); -extern mps_class_t mps_class_mv_debug(void); +extern mps_pool_class_t mps_class_mv(void); +extern mps_pool_class_t mps_class_mv_debug(void); #endif /* mpscmv_h */ /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpscmvff.h b/mps/code/mpscmvff.h index ca1fbcae697..3dfb9b5687c 100644 --- a/mps/code/mpscmvff.h +++ b/mps/code/mpscmvff.h @@ -1,7 +1,7 @@ /* mpscmvff.h: MEMORY POOL SYSTEM CLASS "MVFF" * * $Id$ - * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpscmvff_h @@ -22,15 +22,15 @@ extern const struct mps_key_s _mps_key_mvff_first_fit; #define mps_mvff_free_size mps_pool_free_size #define mps_mvff_size mps_pool_total_size -extern mps_class_t mps_class_mvff(void); -extern mps_class_t mps_class_mvff_debug(void); +extern mps_pool_class_t mps_class_mvff(void); +extern mps_pool_class_t mps_class_mvff_debug(void); #endif /* mpscmvff_h */ /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpscmvt.h b/mps/code/mpscmvt.h index 9490d5ffb77..943a97e6f6f 100644 --- a/mps/code/mpscmvt.h +++ b/mps/code/mpscmvt.h @@ -1,7 +1,7 @@ /* mpscmvt.h: MEMORY POOL SYSTEM CLASS "MVT" * * $Id$ - * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpscmvt_h @@ -16,7 +16,7 @@ extern const struct mps_key_s _mps_key_mvt_frag_limit; #define MPS_KEY_MVT_FRAG_LIMIT (&_mps_key_mvt_frag_limit) #define MPS_KEY_MVT_FRAG_LIMIT_FIELD d -extern mps_class_t mps_class_mvt(void); +extern mps_pool_class_t mps_class_mvt(void); #define mps_mvt_free_size mps_pool_free_size #define mps_mvt_size mps_pool_total_size @@ -26,7 +26,7 @@ extern mps_class_t mps_class_mvt(void); /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2013 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpscsnc.h b/mps/code/mpscsnc.h index 8a87d7b5d69..9f95faedb5e 100644 --- a/mps/code/mpscsnc.h +++ b/mps/code/mpscsnc.h @@ -1,7 +1,7 @@ /* mpscsnc.h: MEMORY POOL SYSTEM CLASS "SNC" * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #ifndef mpscsnc_h @@ -9,14 +9,14 @@ #include "mps.h" -extern mps_class_t mps_class_snc(void); +extern mps_pool_class_t mps_class_snc(void); #endif /* mpscsnc_h */ /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpsi.c b/mps/code/mpsi.c index a679955456d..ff312b2f5c1 100644 --- a/mps/code/mpsi.c +++ b/mps/code/mpsi.c @@ -623,7 +623,7 @@ void mps_fmt_destroy(mps_fmt_t format) mps_res_t mps_pool_create(mps_pool_t *mps_pool_o, mps_arena_t arena, - mps_class_t mps_class, ...) + mps_pool_class_t mps_class, ...) { mps_res_t res; va_list varargs; @@ -634,16 +634,16 @@ mps_res_t mps_pool_create(mps_pool_t *mps_pool_o, mps_arena_t arena, } mps_res_t mps_pool_create_v(mps_pool_t *mps_pool_o, mps_arena_t arena, - mps_class_t class, va_list varargs) + mps_pool_class_t pool_class, va_list varargs) { mps_arg_s args[MPS_ARGS_MAX]; - AVERT(PoolClass, class); - class->varargs(args, varargs); - return mps_pool_create_k(mps_pool_o, arena, class, args); + AVERT(PoolClass, pool_class); + pool_class->varargs(args, varargs); + return mps_pool_create_k(mps_pool_o, arena, pool_class, args); } mps_res_t mps_pool_create_k(mps_pool_t *mps_pool_o, mps_arena_t arena, - mps_class_t class, mps_arg_s args[]) + mps_pool_class_t pool_class, mps_arg_s args[]) { Pool pool; Res res; @@ -652,10 +652,10 @@ mps_res_t mps_pool_create_k(mps_pool_t *mps_pool_o, mps_arena_t arena, AVER(mps_pool_o != NULL); AVERT(Arena, arena); - AVERT(PoolClass, class); + AVERT(PoolClass, pool_class); AVERT(ArgList, args); - res = PoolCreate(&pool, arena, class, args); + res = PoolCreate(&pool, arena, pool_class, args); ArenaLeave(arena); diff --git a/mps/code/mv2test.c b/mps/code/mv2test.c index a3c5e807a04..9552b336e7b 100644 --- a/mps/code/mv2test.c +++ b/mps/code/mv2test.c @@ -86,7 +86,7 @@ static mps_res_t make(mps_addr_t *p, mps_ap_t ap, size_t size, mps_align_t align static mps_res_t stress(mps_arena_t arena, mps_align_t align, size_t (*size)(unsigned long i), - mps_class_t class, mps_arg_s args[]) + mps_pool_class_t pool_class, mps_arg_s args[]) { mps_res_t res; mps_ap_t ap; @@ -94,7 +94,7 @@ static mps_res_t stress(mps_arena_t arena, mps_align_t align, int *ps[TEST_SET_SIZE]; size_t ss[TEST_SET_SIZE]; - res = mps_pool_create_k(&pool, arena, class, args); + res = mps_pool_create_k(&pool, arena, pool_class, args); if(res != MPS_RES_OK) return res; die(mps_ap_create(&ap, pool, mps_rank_exact()), "BufferCreate"); diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index 15ed2b0396a..e6d4ddac154 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c @@ -2481,16 +2481,16 @@ DEFINE_POOL_CLASS(AMCPoolClass, this) /* mps_class_amc -- return the pool class descriptor to the client */ -mps_class_t mps_class_amc(void) +mps_pool_class_t mps_class_amc(void) { - return (mps_class_t)AMCPoolClassGet(); + return (mps_pool_class_t)AMCPoolClassGet(); } /* mps_class_amcz -- return the pool class descriptor to the client */ -mps_class_t mps_class_amcz(void) +mps_pool_class_t mps_class_amcz(void) { - return (mps_class_t)AMCZPoolClassGet(); + return (mps_pool_class_t)AMCZPoolClassGet(); } diff --git a/mps/code/poolamsi.c b/mps/code/poolamsi.c index 4e78c445bb4..20ed01d6b39 100644 --- a/mps/code/poolamsi.c +++ b/mps/code/poolamsi.c @@ -1,7 +1,7 @@ /* poolamsi.c: AUTOMATIC MARK & SWEEP POOL CLASS C INTERFACE * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. */ #include "mpscams.h" @@ -13,23 +13,23 @@ SRCID(poolamsi, "$Id$"); /* mps_class_ams -- return the AMS pool class descriptor */ -mps_class_t mps_class_ams(void) +mps_pool_class_t mps_class_ams(void) { - return (mps_class_t)AMSPoolClassGet(); + return (mps_pool_class_t)AMSPoolClassGet(); } /* mps_class_ams_debug -- return the AMS (debug) pool class descriptor */ -mps_class_t mps_class_ams_debug(void) +mps_pool_class_t mps_class_ams_debug(void) { - return (mps_class_t)AMSDebugPoolClassGet(); + return (mps_pool_class_t)AMSDebugPoolClassGet(); } /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (C) 2001-2014 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/poolawl.c b/mps/code/poolawl.c index c61c0f5267e..b00d9129c75 100644 --- a/mps/code/poolawl.c +++ b/mps/code/poolawl.c @@ -1349,9 +1349,9 @@ DEFINE_POOL_CLASS(AWLPoolClass, this) } -mps_class_t mps_class_awl(void) +mps_pool_class_t mps_class_awl(void) { - return (mps_class_t)AWLPoolClassGet(); + return (mps_pool_class_t)AWLPoolClassGet(); } diff --git a/mps/code/poollo.c b/mps/code/poollo.c index d0408f20557..b60ae06ea02 100644 --- a/mps/code/poollo.c +++ b/mps/code/poollo.c @@ -850,9 +850,9 @@ DEFINE_POOL_CLASS(LOPoolClass, this) /* mps_class_lo -- the external interface to get the LO pool class */ -mps_class_t mps_class_lo(void) +mps_pool_class_t mps_class_lo(void) { - return (mps_class_t)EnsureLOPoolClass(); + return (mps_pool_class_t)EnsureLOPoolClass(); } diff --git a/mps/code/poolmfs.c b/mps/code/poolmfs.c index 9acf8814e8d..03557dfe8f7 100644 --- a/mps/code/poolmfs.c +++ b/mps/code/poolmfs.c @@ -381,9 +381,9 @@ PoolClass PoolClassMFS(void) } -mps_class_t mps_class_mfs(void) +mps_pool_class_t mps_class_mfs(void) { - return (mps_class_t)PoolClassMFS(); + return (mps_pool_class_t)PoolClassMFS(); } diff --git a/mps/code/poolmv.c b/mps/code/poolmv.c index 252ca96ee05..0146fe121b7 100644 --- a/mps/code/poolmv.c +++ b/mps/code/poolmv.c @@ -872,14 +872,14 @@ DEFINE_POOL_CLASS(MVDebugPoolClass, this) * Note this is an MPS interface extension */ -mps_class_t mps_class_mv(void) +mps_pool_class_t mps_class_mv(void) { - return (mps_class_t)(EnsureMVPoolClass()); + return (mps_pool_class_t)(EnsureMVPoolClass()); } -mps_class_t mps_class_mv_debug(void) +mps_pool_class_t mps_class_mv_debug(void) { - return (mps_class_t)(EnsureMVDebugPoolClass()); + return (mps_pool_class_t)(EnsureMVDebugPoolClass()); } diff --git a/mps/code/poolmv2.c b/mps/code/poolmv2.c index d72a8c8a600..cd5cce43b2c 100644 --- a/mps/code/poolmv2.c +++ b/mps/code/poolmv2.c @@ -1115,9 +1115,9 @@ PoolClass PoolClassMVT(void) /* mps_class_mvt -- the class of an mvt pool */ -mps_class_t mps_class_mvt(void) +mps_pool_class_t mps_class_mvt(void) { - return (mps_class_t)(PoolClassMVT()); + return (mps_pool_class_t)(PoolClassMVT()); } diff --git a/mps/code/poolmvff.c b/mps/code/poolmvff.c index 298e3dca40d..2f4d6a3b241 100644 --- a/mps/code/poolmvff.c +++ b/mps/code/poolmvff.c @@ -754,14 +754,14 @@ DEFINE_POOL_CLASS(MVFFDebugPoolClass, this) /* MPS Interface Extensions. */ -mps_class_t mps_class_mvff(void) +mps_pool_class_t mps_class_mvff(void) { - return (mps_class_t)(MVFFPoolClassGet()); + return (mps_pool_class_t)(MVFFPoolClassGet()); } -mps_class_t mps_class_mvff_debug(void) +mps_pool_class_t mps_class_mvff_debug(void) { - return (mps_class_t)(MVFFDebugPoolClassGet()); + return (mps_pool_class_t)(MVFFDebugPoolClassGet()); } diff --git a/mps/code/poolsnc.c b/mps/code/poolsnc.c index 7b502cb37da..676ab7e01f8 100644 --- a/mps/code/poolsnc.c +++ b/mps/code/poolsnc.c @@ -687,9 +687,9 @@ DEFINE_POOL_CLASS(SNCPoolClass, this) } -mps_class_t mps_class_snc(void) +mps_pool_class_t mps_class_snc(void) { - return (mps_class_t)SNCPoolClassGet(); + return (mps_pool_class_t)SNCPoolClassGet(); } diff --git a/mps/code/sacss.c b/mps/code/sacss.c index d65dca43aba..d53177fd18c 100644 --- a/mps/code/sacss.c +++ b/mps/code/sacss.c @@ -43,7 +43,7 @@ static mps_res_t make(mps_addr_t *p, mps_sac_t sac, size_t size) static mps_res_t stress(mps_arena_t arena, mps_align_t align, size_t (*size)(size_t i), - const char *name, mps_class_t pool_class, + const char *name, mps_pool_class_t pool_class, mps_arg_s *args) { mps_res_t res; diff --git a/mps/code/segsmss.c b/mps/code/segsmss.c index c8fec3f1277..a271a582f7c 100644 --- a/mps/code/segsmss.c +++ b/mps/code/segsmss.c @@ -702,9 +702,9 @@ static void mps_amst_ap_stress(mps_ap_t ap) /* mps_class_amst -- return the pool class descriptor to the client */ -static mps_class_t mps_class_amst(void) +static mps_pool_class_t mps_class_amst(void) { - return (mps_class_t)AMSTPoolClassGet(); + return (mps_pool_class_t)AMSTPoolClassGet(); } diff --git a/mps/code/walkt0.c b/mps/code/walkt0.c index 8cc7e647974..6a378ffe659 100644 --- a/mps/code/walkt0.c +++ b/mps/code/walkt0.c @@ -127,7 +127,7 @@ static void stepper(mps_addr_t object, mps_fmt_t format, /* test -- the body of the test */ -static void *test(mps_arena_t arena, mps_class_t pool_class) +static void *test(mps_arena_t arena, mps_pool_class_t pool_class) { mps_chain_t chain; mps_fmt_t format; diff --git a/mps/design/object-debug.txt b/mps/design/object-debug.txt index b99049a9d1d..8f92a0dc021 100644 --- a/mps/design/object-debug.txt +++ b/mps/design/object-debug.txt @@ -340,11 +340,6 @@ fencepost. _`.interface.fenceposting.checker`: A format method to check the fenceposts around an object. The ``NULL`` method checks tails. -``mps_class_t mps_debug_class(mps_class_t class)`` - -_`.interface.fenceposting.pool`: A function to wrap a pool class -to provide fenceposting (note absence of arena parameter). - ``mps_res_t mps_alloc(mps_addr_t *, mps_pool_t, size_t);`` ``mps_res_t mps_alloc_dbg(mps_addr_t *, mps_pool_t, size_t, ...);`` ``mps_res_t mps_alloc_dbg_v(mps_addr_t *, mps_pool_t, size_t, va_list);`` diff --git a/mps/manual/source/glossary/p.rst b/mps/manual/source/glossary/p.rst index 5fdba129d77..00dce4971ff 100644 --- a/mps/manual/source/glossary/p.rst +++ b/mps/manual/source/glossary/p.rst @@ -398,8 +398,8 @@ Memory Management Glossary: P .. mps:specific:: - A value of type :c:type:`mps_class_t` describing a class - of :term:`pools` that manage memory according to + A value of type :c:type:`mps_pool_class_t` describing a + class of :term:`pools` that manage memory according to particular policy. See :ref:`pool`. precise garbage collection diff --git a/mps/manual/source/pool/amc.rst b/mps/manual/source/pool/amc.rst index db15b6e7a21..edd1dbd3e07 100644 --- a/mps/manual/source/pool/amc.rst +++ b/mps/manual/source/pool/amc.rst @@ -101,7 +101,7 @@ AMC interface #include "mpscamc.h" -.. c:function:: mps_class_t mps_class_amc(void) +.. c:function:: mps_pool_class_t mps_class_amc(void) Return the :term:`pool class` for an AMC (Automatic Mostly-Copying) :term:`pool`. @@ -144,7 +144,7 @@ AMC interface chain like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_amc(), + mps_pool_class_t mps_class_amc(), mps_fmt_t fmt, mps_chain_t chain) diff --git a/mps/manual/source/pool/amcz.rst b/mps/manual/source/pool/amcz.rst index 61555fd180a..9993647d0db 100644 --- a/mps/manual/source/pool/amcz.rst +++ b/mps/manual/source/pool/amcz.rst @@ -54,7 +54,7 @@ AMCZ interface #include "mpscamc.h" -.. c:function:: mps_class_t mps_class_amcz(void) +.. c:function:: mps_pool_class_t mps_class_amcz(void) Return the :term:`pool class` for an AMCZ (Automatic Mostly-Copying Zero-rank) :term:`pool`. @@ -93,6 +93,6 @@ AMCZ interface chain like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_amcz(), + mps_pool_class_t mps_class_amcz(), mps_fmt_t fmt, mps_chain_t chain) diff --git a/mps/manual/source/pool/ams.rst b/mps/manual/source/pool/ams.rst index 59d5ccfbd57..98da5eda587 100644 --- a/mps/manual/source/pool/ams.rst +++ b/mps/manual/source/pool/ams.rst @@ -98,7 +98,7 @@ AMS interface #include "mpscams.h" -.. c:function:: mps_class_t mps_class_ams(void) +.. c:function:: mps_pool_class_t mps_class_ams(void) Return the :term:`pool class` for an AMS (Automatic Mark & Sweep) :term:`pool`. @@ -143,7 +143,7 @@ AMS interface chain, and ambiguous flag like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_ams(), + mps_pool_class_t mps_class_ams(), mps_fmt_t fmt, mps_chain_t chain, mps_bool_t support_ambiguous) @@ -174,7 +174,7 @@ AMS interface mps_rank_t rank) -.. c:function:: mps_class_t mps_class_ams_debug(void) +.. c:function:: mps_pool_class_t mps_class_ams_debug(void) A :ref:`debugging ` version of the AMS pool class. @@ -193,7 +193,7 @@ AMS interface this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_ams_debug(), + mps_pool_class_t mps_class_ams_debug(), mps_pool_debug_option_s debug_option, mps_fmt_t fmt, mps_chain_t chain, diff --git a/mps/manual/source/pool/awl.rst b/mps/manual/source/pool/awl.rst index dd48e1f79a9..e4437ebe5ee 100644 --- a/mps/manual/source/pool/awl.rst +++ b/mps/manual/source/pool/awl.rst @@ -308,7 +308,7 @@ AWL interface #include "mpscawl.h" -.. c:function:: mps_class_t mps_class_awl(void) +.. c:function:: mps_pool_class_t mps_class_awl(void) Return the :term:`pool class` for an AWL (Automatic Weak Linked) :term:`pool`. @@ -356,7 +356,7 @@ AWL interface find-dependent function like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_awl(), + mps_pool_class_t mps_class_awl(), mps_fmt_t fmt, mps_awl_find_dependent_t find_dependent) diff --git a/mps/manual/source/pool/lo.rst b/mps/manual/source/pool/lo.rst index e1723a42e0d..edd784c1fe5 100644 --- a/mps/manual/source/pool/lo.rst +++ b/mps/manual/source/pool/lo.rst @@ -103,7 +103,7 @@ LO interface #include "mpsclo.h" -.. c:function:: mps_class_t mps_class_lo(void) +.. c:function:: mps_pool_class_t mps_class_lo(void) Return the :term:`pool class` for an LO (Leaf Object) :term:`pool`. @@ -143,5 +143,5 @@ LO interface this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_lo(), + mps_pool_class_t mps_class_lo(), mps_fmt_t fmt) diff --git a/mps/manual/source/pool/mfs.rst b/mps/manual/source/pool/mfs.rst index cfaad56e6ab..e130e3fcda4 100644 --- a/mps/manual/source/pool/mfs.rst +++ b/mps/manual/source/pool/mfs.rst @@ -75,7 +75,7 @@ MFS interface #include "mpscmfs.h" -.. c:function:: mps_class_t mps_class_mfs(void) +.. c:function:: mps_pool_class_t mps_class_mfs(void) Return the :term:`pool class` for an MFS (Manual Fixed Small) :term:`pool`. @@ -110,6 +110,6 @@ MFS interface unit size like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_mfs(), + mps_pool_class_t mps_class_mfs(), size_t extend_size, size_t unit_size) diff --git a/mps/manual/source/pool/mv.rst b/mps/manual/source/pool/mv.rst index f38df2e37b6..1e098ff5a63 100644 --- a/mps/manual/source/pool/mv.rst +++ b/mps/manual/source/pool/mv.rst @@ -65,7 +65,7 @@ MV interface #include "mpscmv.h" -.. c:function:: mps_class_t mps_class_mv(void) +.. c:function:: mps_pool_class_t mps_class_mv(void) Return the :term:`pool class` for an MV (Manual Variable) :term:`pool`. @@ -111,13 +111,13 @@ MV interface mean size, and maximum size like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_mv(), + mps_pool_class_t mps_class_mv(), size_t extend_size, size_t average_size, mps_size_t maximum_size) -.. c:function:: mps_class_t mps_class_mv_debug(void) +.. c:function:: mps_pool_class_t mps_class_mv_debug(void) A :ref:`debugging ` version of the MV pool class. @@ -135,7 +135,7 @@ MV interface this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_mv_debug(), + mps_pool_class_t mps_class_mv_debug(), mps_pool_debug_option_s debug_option, mps_size_t extend_size, mps_size_t average_size, diff --git a/mps/manual/source/pool/mvff.rst b/mps/manual/source/pool/mvff.rst index bf878156771..5dce87d5f3c 100644 --- a/mps/manual/source/pool/mvff.rst +++ b/mps/manual/source/pool/mvff.rst @@ -107,7 +107,7 @@ MVFF interface #include "mpscmvff.h" -.. c:function:: mps_class_t mps_class_mvff(void) +.. c:function:: mps_pool_class_t mps_class_mvff(void) Return the :term:`pool class` for an MVFF (Manual Variable First Fit) :term:`pool`. @@ -185,7 +185,7 @@ MVFF interface this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_mvff(), + mps_pool_class_t mps_class_mvff(), size_t extend_size, size_t average_size, mps_align_t alignment, @@ -194,7 +194,7 @@ MVFF interface mps_bool_t first_fit) -.. c:function:: mps_class_t mps_class_mvff_debug(void) +.. c:function:: mps_pool_class_t mps_class_mvff_debug(void) A :ref:`debugging ` version of the MVFF pool class. @@ -215,7 +215,7 @@ MVFF interface this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_mvff_debug(), + mps_pool_class_t mps_class_mvff_debug(), mps_pool_debug_option_s debug_option, size_t extend_size, size_t average_size, diff --git a/mps/manual/source/pool/mvt.rst b/mps/manual/source/pool/mvt.rst index 4f89b8d5178..a5b9daafbdc 100644 --- a/mps/manual/source/pool/mvt.rst +++ b/mps/manual/source/pool/mvt.rst @@ -106,7 +106,7 @@ MVT interface #include "mpscmvt.h" -.. c:function:: mps_class_t mps_class_mvt(void) +.. c:function:: mps_pool_class_t mps_class_mvt(void) Return the :term:`pool class` for an MVT (Manual Variable Temporal) :term:`pool`. @@ -203,7 +203,7 @@ MVT interface this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_mvt(), + mps_pool_class_t mps_class_mvt(), size_t minimum_size, size_t mean_size, size_t maximum_size, diff --git a/mps/manual/source/pool/snc.rst b/mps/manual/source/pool/snc.rst index 2146a417552..2e82d055e7c 100644 --- a/mps/manual/source/pool/snc.rst +++ b/mps/manual/source/pool/snc.rst @@ -91,7 +91,7 @@ SNC introspection #include "mpscsnc.h" -.. c:function:: mps_class_t mps_class_snc(void) +.. c:function:: mps_pool_class_t mps_class_snc(void) Return the :term:`pool class` for an SNC (Stack No Check) :term:`pool`. @@ -117,7 +117,7 @@ SNC introspection this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, - mps_class_t mps_class_snc(), + mps_pool_class_t mps_class_snc(), mps_fmt_t fmt) When creating an :term:`allocation point` on an SNC pool, diff --git a/mps/manual/source/release.rst b/mps/manual/source/release.rst index 155b277ef39..fc9cc438c55 100644 --- a/mps/manual/source/release.rst +++ b/mps/manual/source/release.rst @@ -3,6 +3,20 @@ Release notes ============= + +.. _release-notes-1.115: + +Release 1.115.0 +--------------- + +Interface changes +................. + +#. The type of pool classes is now :c:type:`mps_pool_class_t`. The old + name :c:type:`mps_class_t` is still available via a ``typedef``, + but is deprecated. + + .. _release-notes-1.114: Release 1.114.0 diff --git a/mps/manual/source/topic/pool.rst b/mps/manual/source/topic/pool.rst index 0ba60e8c1ce..68ec8185f03 100644 --- a/mps/manual/source/topic/pool.rst +++ b/mps/manual/source/topic/pool.rst @@ -19,7 +19,7 @@ making it available for allocation. :c:func:`mps_alloc` or via an :term:`allocation point`. -.. c:function:: mps_res_t mps_pool_create_k(mps_pool_t *pool_o, mps_arena_t arena, mps_class_t class, mps_arg_s args[]) +.. c:function:: mps_res_t mps_pool_create_k(mps_pool_t *pool_o, mps_arena_t arena, mps_pool_class_t pool_class, mps_arg_s args[]) Create a :term:`pool` in an :term:`arena`. @@ -28,7 +28,7 @@ making it available for allocation. ``arena`` is the arena in which to create the pool. - ``class`` is the :term:`pool class` of the new pool. + ``pool_class`` is the :term:`pool class` of the new pool. ``args`` are :term:`keyword arguments` specific to the pool class. See the documentation for the pool class. @@ -40,7 +40,7 @@ making it available for allocation. :c:func:`mps_pool_destroy`. -.. c:function:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, mps_class_t class, ...) +.. c:function:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, mps_pool_class_t pool_class, ...) .. deprecated:: starting with version 1.112. @@ -53,7 +53,7 @@ making it available for allocation. list mechanism. -.. c:function:: mps_res_t mps_pool_create_v(mps_pool_t *pool_o, mps_arena_t arena, mps_class_t class, va_list args) +.. c:function:: mps_res_t mps_pool_create_v(mps_pool_t *pool_o, mps_arena_t arena, mps_pool_class_t pool_class, va_list args) .. deprecated:: starting with version 1.112. @@ -119,14 +119,16 @@ return a block of memory to the pool) and others are See the :ref:`pool` for a list of pool classes. -.. c:type:: mps_class_t +.. c:type:: mps_pool_class_t The type of :term:`pool classes`. - .. note:: +.. c:type:: typedef mps_pool_class_t mps_class_t - This should really have been called ``mps_pool_class_t`` but - it is too late to change it now. + .. deprecated:: starting with version 1.115. + + The former name for ``mps_pool_class_t``, chosen when pools + were the only objects in the MPS that belonged to classes. .. index::