Gareth Rees
1b010bdd9d
Add constant mps_rm_prot_inner and document it.
...
Copied from Perforce
Change: 187271
ServerID: perforce.ravenbrook.com
2014-10-14 22:59:32 +01:00
Gareth Rees
0c42e3aa23
Improved assertion messages when a required keyword argument is not found. instead of "unreachable code", the assertion message is the name of the missing key.
...
Copied from Perforce
Change: 187267
ServerID: perforce.ravenbrook.com
2014-10-14 22:05:30 +01:00
Gareth Rees
7b8e8aa4e1
No need to keep mps_ap_s in sync any more: the definition is shared (mpmst.h includes mpslib.h which includes mps.h).
...
Copied from Perforce
Change: 187221
ServerID: perforce.ravenbrook.com
2014-10-12 13:57:31 +01:00
Gareth Rees
ae4328ad5a
Fix the definition of mps_key_spare_field so that you can set this keyword argument when creating an mvff pool. add test cases that use this feature.
...
Copied from Perforce
Change: 187174
ServerID: perforce.ravenbrook.com
2014-10-10 12:05:23 +01:00
Gareth Rees
21f6addf6c
Rename mps_class_t to mps_pool_class_t for clarity.
...
Retain a typedef for mps_class_t for backwards compatibility.
Copied from Perforce
Change: 187065
ServerID: perforce.ravenbrook.com
2014-09-27 13:37:38 +01:00
Gareth Rees
3aba0f32d9
Catch-up merge from master sources @186573 to branch/2014-05-28/align.
...
Copied from Perforce
Change: 186631
ServerID: perforce.ravenbrook.com
2014-06-14 16:11:20 +01:00
David Lovemore
392e6a056a
Catch up merge from master/...@186577
...
Copied from Perforce
Change: 186582
ServerID: perforce.ravenbrook.com
2014-06-13 16:38:20 +01:00
Gareth Rees
a7c6cd3600
Catch-up merge from master sources @186573 to branch/2014-05-28/align.
...
Copied from Perforce
Change: 186574
ServerID: perforce.ravenbrook.com
2014-06-13 15:37:20 +01:00
Gareth Rees
1dd8a0fa26
Merge branch/2014-06-11/grain into branch/2014-05-28/align.
...
Copied from Perforce
Change: 186561
ServerID: perforce.ravenbrook.com
2014-06-13 13:35:14 +01:00
Gareth Rees
5969ae2114
Catch-up merge from branch/2014-04-15/mvffnoseg @186485 to branch/2014-05-15/size.
...
Copied from Perforce
Change: 186487
ServerID: perforce.ravenbrook.com
2014-06-11 13:17:14 +01:00
Gareth Rees
a08139899f
Catch-up merge from master sources @186481 to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186484
ServerID: perforce.ravenbrook.com
2014-06-11 12:42:58 +01:00
David Lovemore
84ddecde2f
Amc now respects mps_key_extend_by keyword argument.
...
AMC also uses MPS_KEY_LARGE_SIZE keyword argument to specify what size objects need to be to live on their own segment.
Copied from Perforce
Change: 186480
ServerID: perforce.ravenbrook.com
2014-06-11 12:12:44 +01:00
Gareth Rees
317cad785d
Catch-up merge from master sources @186436 to branch/2014-04-08/align.
...
Copied from Perforce
Change: 186439
ServerID: perforce.ravenbrook.com
2014-06-08 16:30:53 +01:00
Gareth Rees
f8dae46723
New type readonlyaddr for managed address that an interface promises only to read through.
...
Use ReadonlyAddr for debugging pool fenceTemplate and freeTemplate, so that we can restore -Wwrite-strings option for GCC.
Copied from Perforce
Change: 186434
ServerID: perforce.ravenbrook.com
2014-06-08 14:53:17 +01:00
Gareth Rees
3704522c58
Catch-up merge from master sources @186352 to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186355
ServerID: perforce.ravenbrook.com
2014-05-29 16:03:34 +01:00
Gareth Rees
a991422ddb
Fix typo.
...
Copied from Perforce
Change: 186230
ServerID: perforce.ravenbrook.com
2014-05-21 12:14:29 +01:00
Gareth Rees
981a266642
New public functions mps_pool_total_size and mps_pool_free_size.
...
Old (undocumented) functions mps_{mv,mvff,mvt}_size and mps_{mv,mvff,mvt}_free_size are now macros for the new public functions.
New pool methods PoolTotalSize and PoolFreeSize, with implementations for public pool classes except SNC.
Coverage of the new functions in apss and mpmss for the manual pool classes, and in finaltest for the automatic pool classes.
Copied from Perforce
Change: 186118
ServerID: perforce.ravenbrook.com
2014-05-15 17:01:59 +01:00
Gareth Rees
cf427ca23c
Merge branch/2014-04-08/align into branch/2014-05-15/size.
...
Copied from Perforce
Change: 186116
ServerID: perforce.ravenbrook.com
2014-05-15 14:54:36 +01:00
Gareth Rees
7cd4759316
Catch-up merge from branch/2014-03-30/addrset to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186082
ServerID: perforce.ravenbrook.com
2014-05-13 16:27:17 +01:00
Gareth Rees
f4a4f1e250
Merge branch/2014-02-23/mvff-tune into branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186079
ServerID: perforce.ravenbrook.com
2014-05-13 16:10:51 +01:00
Gareth Rees
3a1ce9493f
Remove mps_key_cbs_extend_by and mfsextendself keyword arguments to cbsinit. these were unused and obsoleted by cbsblockpool.
...
Copied from Perforce
Change: 186006
ServerID: perforce.ravenbrook.com
2014-05-11 19:09:44 +01:00
Gareth Rees
e50f28afeb
The mps_args_add_field and mps_args_done now check that the number of arguments is in bounds.
...
Copied from Perforce
Change: 185938
ServerID: perforce.ravenbrook.com
2014-05-02 11:34:38 +01:00
Gareth Rees
47fbeb1572
Provide a default value for mps_key_pool_debug_options.
...
Don't use const in the types of the debugging templates: it's infectious!
Copied from Perforce
Change: 185489
ServerID: perforce.ravenbrook.com
2014-04-13 18:02:10 +01:00
Gareth Rees
ad73388c21
Size class structures (mps_sac_class_s) are public, so should have names starting with "mps_" (these were removed incorrectly in change 179383).
...
Copied from Perforce
Change: 185389
ServerID: perforce.ravenbrook.com
2014-04-09 14:37:39 +01:00
Gareth Rees
1fc2bbe52b
Fixed dl's review comments < https://info.ravenbrook.com/mail/2014/04/01/13-28-17/0/ >.
...
Copied from Perforce
Change: 185127
ServerID: perforce.ravenbrook.com
2014-04-01 17:02:00 +01:00
Richard Brooksby
2b9719e4bd
Catch-up merge from master.
...
Copied from Perforce
Change: 184732
ServerID: perforce.ravenbrook.com
2014-03-11 16:30:47 +00:00
Richard Brooksby
4eec2493b7
Adding a keyword to the arena to disable zoned allocation.
...
Copied from Perforce
Change: 184599
ServerID: perforce.ravenbrook.com
2014-02-28 13:20:06 +00:00
Gareth Rees
00898bf2e9
Fix the aver: need two slots in the array, not just one.
...
Copied from Perforce
Change: 184545
ServerID: perforce.ravenbrook.com
2014-02-26 12:51:30 +00:00
Gareth Rees
6971bee496
Make mps_args_done obsolete.
...
Copied from Perforce
Change: 184543
ServerID: perforce.ravenbrook.com
2014-02-26 12:47:27 +00:00
Richard Brooksby
f9051f09f6
Catch-up merge from master, mainly to pick up gcbench fixes.
...
Copied from Perforce
Change: 184504
ServerID: perforce.ravenbrook.com
2014-02-25 01:29:12 +00:00
Richard Brooksby
f31fc5325a
Instead of aggressively returning every page it can, mvff takes a parameter for the proportion of spare space to hold in its free lists before attempting to return space to the arena.
...
Copied from Perforce
Change: 184498
ServerID: perforce.ravenbrook.com
2014-02-24 23:04:31 +00:00
Richard Brooksby
2efd201955
Declaring result codes using a relational macro, so that tests can print more meaningful output, and to eliminate redundant code.
...
Copied from Perforce
Change: 184382
ServerID: perforce.ravenbrook.com
2014-02-19 11:55:43 +00:00
Richard Brooksby
f0b07f7bbe
Added a pool argument to cbs creation so that cbss can share a pool. in particular, per-zone allocation cbss for the arena can share a single special block pool.
...
Copied from Perforce
Change: 184469
ServerID: perforce.ravenbrook.com
2014-02-18 13:53:56 +00:00
Richard Brooksby
4b50f3688b
Adding mps_key_gen generation keyword to pools that take a chain (except amc), so that you can specify which generation to allocate in by default. this allows some flexibility when the client can predict the lifetimes of objects.
...
The AWL and LO pools allocate into generation 1 of the arena default chain if neither MPS_KEY_CHAIN or MPS_KEY_GEN is specified, simulating the default setup before the chain-zones branch.
Copied from Perforce
Change: 184231
ServerID: perforce.ravenbrook.com
2014-01-30 14:27:09 +00:00
Gareth Rees
d2c28e7deb
Fix broken mps_key_pool_debug_options keyword argument.
...
Copied from Perforce
Change: 183524
ServerID: perforce.ravenbrook.com
2013-10-04 11:05:56 +01:00
Gareth Rees
949578bac4
Avoid warnings when compiling with -wwrite-strings:
...
* Use const char * in places where we want to assign string constants.
Avoid warnings when compiling with -Wextra:
* Avoid if statement with empty body in amcsshe.c
* Avoid comparison of unsigned >= 0.
Copied from Perforce
Change: 183498
ServerID: perforce.ravenbrook.com
2013-10-01 10:52:45 +01:00
Gareth Rees
e88bcc5184
Document the intention behind mps_ld_isstale rather than the implementation: it captures the intention of testing whether a particular dependency is stale (even though the implementation in fact tests whether any dependency is stale). add new function mps_ls_isstale_any for expressing the intention of testing whether any dependencey is stale. the two functions have the same implementation at present, but the separation gives us the freedom to return a more precise result from mps_ld_isstale in future.
...
Copied from Perforce
Change: 182816
ServerID: perforce.ravenbrook.com
2013-06-20 16:25:08 +01:00
Richard Brooksby
46bc17e2a9
Catch-up merge from custom/cet/main to master, to pick up arena extension callbacks.
...
Copied from Perforce
Change: 182701
ServerID: perforce.ravenbrook.com
2013-06-12 15:33:49 +01:00
Richard Brooksby
56645cdc0c
Merging branch/2013-05-17/emergency with major rework of mvt, mvff, and cbs.
...
Some parts of this are still ragged, and would not normally pass review, but this is a massive improvement to the existing code.
Copied from Perforce
Change: 182614
ServerID: perforce.ravenbrook.com
2013-06-08 10:57:57 +01:00
Gareth Rees
aaf6e8b13b
New public function mps_fmt_create_k creates an object format using the keyword argument interface.
...
Deprecate the format variant structures (mps_fmt_A_s, mps_fmt_B_s, mps_fmt_auto_header_s, mps_fmt_fixed_s) and the old interface (mps_fmt_create_A, mps_fmt_create_B, mps_fmt_create_auto_header, mps_fmt_create_fixed).
Copied from Perforce
Change: 182277
ServerID: perforce.ravenbrook.com
2013-05-28 16:10:08 +01:00
Gareth Rees
4c5bca4bd0
Fix review comments from rb in < https://info.ravenbrook.com/mail/2013/05/23/18-17-17/0/ >
...
Copied from Perforce
Change: 182149
ServerID: perforce.ravenbrook.com
2013-05-24 00:48:19 +01:00
Richard Brooksby
30ffeaec27
Adding mps_arg_s fields for float and double, to complete the set of basic types.
...
Copied from Perforce
Change: 181853
ServerID: perforce.ravenbrook.com
2013-05-16 13:13:51 +01:00
Richard Brooksby
8acbc5780b
Quietly eliminating varargs to mps_alloc. they were never documented.
...
Copied from Perforce
Change: 181843
ServerID: perforce.ravenbrook.com
2013-05-16 03:07:50 +01:00
Gareth Rees
56b78ef7b9
Remove mps_arg from mps.h.
...
Use MPS_ARGS_BEGIN etc in the Scheme example and in the manual.
Use MPS_BEGIN and MPS_END instead of BEGIN and END.
The _FIELD macros don't need to be function-like macros.
Restore TODO comments in mps.h.
Scheme example compiles with -std=c89.
Copied from Perforce
Change: 181749
ServerID: perforce.ravenbrook.com
2013-05-13 21:01:38 +01:00
Gareth Rees
cce6ee29c8
New macro mps_arg and revised macro mps_args_add mean that client programs no longer need to know which keyword argument goes in which field. revise documentation accordingly.
...
Copied from Perforce
Change: 181736
ServerID: perforce.ravenbrook.com
2013-05-12 17:21:03 +01:00
Gareth Rees
d0a8ac6e14
Rename mps_arena_create_args to mps_arena_create_k to match the documentation, and for consistency with mps_pool_create_k and mps_ap_create_k.
...
Copied from Perforce
Change: 181722
ServerID: perforce.ravenbrook.com
2013-05-11 19:17:06 +01:00
Richard Brooksby
688b5bf73d
Converting varags on buffer and ap creation into keyword argument lists.
...
Copied from Perforce
Change: 181680
ServerID: perforce.ravenbrook.com
2013-05-09 18:25:53 +01:00
Richard Brooksby
af44d1241f
Replacing varargs passed to seginit with keyword argument list.
...
Copied from Perforce
Change: 181679
ServerID: perforce.ravenbrook.com
2013-05-09 17:34:01 +01:00
Richard Brooksby
c851eaf157
Moving mps_key_vmw3_top_down definition to arena.c so that it's present on all platforms.
...
Copied from Perforce
Change: 181669
ServerID: perforce.ravenbrook.com
2013-05-09 14:57:38 +01:00
Richard Brooksby
80e84d09a5
Adding macros to make keyword argument list formation more convenient and robust.
...
Copied from Perforce
Change: 181666
ServerID: perforce.ravenbrook.com
2013-05-09 14:04:23 +01:00