Richard Brooksby
e09dbaab0f
Promoting shield to first class structure.
...
Copied from Perforce
Change: 190219
ServerID: perforce.ravenbrook.com
2016-03-20 00:32:43 +00:00
Richard Brooksby
ff69c9af04
Separating flag for segment in shield cache from depth, clarifying code and optimising segfree somewhat.
...
Copied from Perforce
Change: 190194
ServerID: perforce.ravenbrook.com
2016-03-19 13:42:09 +00:00
Richard Brooksby
641cdc164c
Catch-up merge from master sources to branch/2016-03-11/shield-coalesce.
...
Copied from Perforce
Change: 190150
ServerID: perforce.ravenbrook.com
2016-03-17 13:53:40 +00:00
Richard Brooksby
662a1b1b9b
Allocate the shield cache. also improve commentary quite a bit.
...
Copied from Perforce
Change: 190147
ServerID: perforce.ravenbrook.com
2016-03-17 13:37:40 +00:00
Richard Brooksby
9583c0f68a
Merging branch mps/branch/2016-03-13/without-reservation into master sources.
...
Copied from Perforce
Change: 190106
ServerID: perforce.ravenbrook.com
2016-03-15 13:19:27 +00:00
Richard Brooksby
26da5b46b0
Catch-up merge from master sources to branch/2014-10-13/format.
...
Copied from Perforce
Change: 190060
ServerID: perforce.ravenbrook.com
2016-03-15 10:02:21 +00:00
Richard Brooksby
d4a055f70b
Merging branch/2016-03-12/pause into the master sources.
...
Copied from Perforce
Change: 190053
ServerID: perforce.ravenbrook.com
2016-03-15 06:31:08 +00:00
Gareth Rees
e034e7aeea
Address points made by rb in review < https://info.ravenbrook.com/mail/2016/03/14/18-48-19/0/ >
...
Copied from Perforce
Change: 190031
ServerID: perforce.ravenbrook.com
2016-03-14 20:10:14 +00:00
Richard Brooksby
ca7dcd913e
Basic removal of the reservoir pool from code and design.
...
Copied from Perforce
Change: 190000
ServerID: perforce.ravenbrook.com
2016-03-13 20:32:24 +00:00
Gareth Rees
31de518300
Catch-up merge from branch/2015-08-25/tradeoff to branch/2016-03-12/pause (to pick up the morework value in arenapoll).
...
Copied from Perforce
Change: 189918
ServerID: perforce.ravenbrook.com
2016-03-12 20:32:41 +00:00
Gareth Rees
f9041d9a20
Documentation and interface for pause time control (no implementation yet).
...
Copied from Perforce
Change: 189915
ServerID: perforce.ravenbrook.com
2016-03-12 20:25:33 +00:00
Richard Brooksby
275770ed43
Catch-up merge from master sources to branch/2015-08-25/tradeoff.
...
Copied from Perforce
Change: 189891
ServerID: perforce.ravenbrook.com
2016-03-12 15:13:15 +00:00
Gareth Rees
973f5369e1
Rename chain.h to locus.h, for consistency with other modules, where the interface has the same name as the implemention.
...
Copied from Perforce
Change: 189682
ServerID: perforce.ravenbrook.com
2016-03-06 18:56:32 +00:00
Richard Brooksby
50384dd478
Fixing terminology from "top" to "hot end" of stack.
...
Copied from Perforce
Change: 189530
ServerID: perforce.ravenbrook.com
2016-03-02 10:16:44 +00:00
Richard Brooksby
a3efd2d694
Catch-up merge from branch/2015-08-06/config to remove arenaconfigure.
...
Copied from Perforce
Change: 189335
ServerID: perforce.ravenbrook.com
2016-02-25 22:59:06 +00:00
Richard Brooksby
a0e001c000
Catch up merge from master sources.
...
Copied from Perforce
Change: 189130
ServerID: perforce.ravenbrook.com
2016-02-10 21:10:25 +00:00
Richard Brooksby
eac348d664
Catch-up merge from masters.
...
Copied from Perforce
Change: 188921
ServerID: perforce.ravenbrook.com
2016-01-19 16:22:39 +00:00
Gareth Rees
edf30c06b4
New function mps_root_create_reg_masked applies a mask and pattern test to all words in registers and on the stack when scanning them. this supports tagged references in these locations.
...
Consistently use the type "Word *" for pointers into the stack or into saved registers.
Remove TraceScanAreaTagged.
Copied from Perforce
Change: 188231
ServerID: perforce.ravenbrook.com
2015-09-04 12:22:03 +01:00
Gareth Rees
b4db3bd09f
Introduce new type work representing a measure of work done by the collector. use this systematically to make the code clearer.
...
Copied from Perforce
Change: 188210
ServerID: perforce.ravenbrook.com
2015-09-03 13:01:55 +01:00
Gareth Rees
511ec1c025
Catch-up merge from branch/2015-08-10/arena-create to branch/2015-08-06/config.
...
Copied from Perforce
Change: 188104
ServerID: perforce.ravenbrook.com
2015-08-10 12:49:36 +01:00
Gareth Rees
6359b0ed98
Merge branch/2014-09-29/reserved into the master sources.
...
Copied from Perforce
Change: 188090
ServerID: perforce.ravenbrook.com
2015-08-07 16:33:43 +01:00
Gareth Rees
703c1ee5f5
New function mps_arena_configure provides keyword argument interface to changing the properties of an arena.
...
New keyword arguments MPS_KEY_ARENA_COMMIT_LIMIT and MPS_KEY_SPARE_ARENA_COMMIT_LIMIT can be passed to mps_arena_create_k or mps_arena_configure.
Deprecate mps_arena_commit_limit_set and mps_arena_spare_commit_limit_set.
Copied from Perforce
Change: 188085
ServerID: perforce.ravenbrook.com
2015-08-06 17:02:51 +01:00
Gareth Rees
abbdcfc59f
Assert if a thread dies while registered, but make a best effort to continue working after the assertion, by marking the thread as dead and moving it to a ring of dead threads.
...
Copied from Perforce
Change: 187393
ServerID: perforce.ravenbrook.com
2014-10-25 17:41:42 +01:00
Gareth Rees
4ce030ad13
Use a reference count to discover cases where a format is deleted when a pool is still using it, as suggested by rb < https://info.ravenbrook.com/mail/2014/10/16/13-35-06/0/ >.
...
Copied from Perforce
Change: 187279
ServerID: perforce.ravenbrook.com
2014-10-16 22:59:00 +01:00
Gareth Rees
72a38afb68
Remove unused pool {fill,empty}{mutator,internal}size statistics.
...
Copied from Perforce
Change: 187270
ServerID: perforce.ravenbrook.com
2014-10-14 22:37:55 +01:00
Gareth Rees
f65f1db83e
Attach the pools using a format to a ring in the format, so that when we destroy the format, we can check that no pools are using it.
...
Copied from Perforce
Change: 187253
ServerID: perforce.ravenbrook.com
2014-10-13 22:44:20 +01:00
Gareth Rees
72209444c0
Store reserved address space associated with chunk in a field in the chunkstruct, as suggested by rb in < https://info.ravenbrook.com/mail/2014/10/01/13-55-44/0/ >.
...
Copied from Perforce
Change: 187104
ServerID: perforce.ravenbrook.com
2014-10-01 21:40:50 +01:00
Gareth Rees
53c5301a9e
Instead of iterating over the chunks to compute the total reserved address space, maintain a running total in arenachunkinsert and (new function) arenachunkremoved.
...
New arena class method chunkReserved handles the class-specific computation of the reserved size of a chunk.
Copied from Perforce
Change: 187089
ServerID: perforce.ravenbrook.com
2014-09-29 22:50:46 +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
7c2e271e60
Rename segpref to locuspref -- this structure describes preferences for the placement of any kind of address, not just segments.
...
Add LocusPrefDescribe and use it in MVFFDescribe.
Copied from Perforce
Change: 187061
ServerID: perforce.ravenbrook.com
2014-09-27 11:27:00 +01:00
Gareth Rees
a13a1aa1df
Catch-up merge from master sources @186564 to branch/2014-06-11/grain.
...
Copied from Perforce
Change: 186572
ServerID: perforce.ravenbrook.com
2014-06-13 15:30:46 +01:00
Gareth Rees
100405cac2
Restore the chunk ring.
...
Copied from Perforce
Change: 186558
ServerID: perforce.ravenbrook.com
2014-06-13 12:31:47 +01:00
Gareth Rees
08f341fcc9
Catch-up merge from master sources @186540 to branch/2014-05-17/chunk-tree.
...
Copied from Perforce
Change: 186546
ServerID: perforce.ravenbrook.com
2014-06-12 17:55:16 +01:00
Gareth Rees
bfb0b771dd
Rename "arena alignment" to "arena grain size" to avoid confusion with ordinary structure alignment.
...
Copied from Perforce
Change: 186503
ServerID: perforce.ravenbrook.com
2014-06-11 17:13:03 +01:00
Gareth Rees
de2a30d207
Catch-up merge from master sources @186481 to branch/2014-05-17/chunk-tree.
...
Copied from Perforce
Change: 186491
ServerID: perforce.ravenbrook.com
2014-06-11 13:52:31 +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
181767e4db
Split land iteration into two functions, one which deletes ranges, the other which does not.
...
Copied from Perforce
Change: 186298
ServerID: perforce.ravenbrook.com
2014-05-25 19:26:48 +01:00
Gareth Rees
2f0ef9355d
Clarify tracefix logic by unwinding the nested conditions.
...
Change the arena's chunk tree from a splay tree to an ordinary tree (so that it's not possible to accidentally splay it and leave it unbalanced).
New function TreeFindNext allows us to implement TractFirst and TractNext without having to splay the tree.
Make sure all operations on the chunk tree leave it balanced. But don't balance the tree directly in ChunkFinish() because this is only ever called in a loop where multiple chunks are being deleted from the tre. Instead use the sequence TreeToVine -- iterate and delete -- TreeBalance. The new macro TREE_DESTROY assists with this.
No need any more for ArenaIsReservedAddr, CHUNK_OF_ADDR, TRACT_OF_ADDR.
Update design documentation.
Copied from Perforce
Change: 186212
ServerID: perforce.ravenbrook.com
2014-05-20 18:12:37 +01:00
Gareth Rees
0b0a465674
Replace the chunk ring with a chunk tree.
...
Fix bug in SplayFindNext (LESS and GREATER the wrong way round).
Copied from Perforce
Change: 186157
ServerID: perforce.ravenbrook.com
2014-05-17 17:05:42 +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
87b3880405
New generic function landsize returns the total size of ranges in a land (if the land supports it). implement it for all land classes.
...
The MVFF pool class doesn't have to maintain its free size any more: it can just call LandSize.
Move re-entrancy protection from CBS to Land. This allows us to remove some CBS functions. (But requires some adjustment in failoverDelete.)
In MVFF, do more checking of mvff->total.
Copied from Perforce
Change: 185569
ServerID: perforce.ravenbrook.com
2014-04-15 16:35:34 +01:00
Gareth Rees
4deafee125
Lands maintain the total size of the address ranges they maintain. (this avoids the need to do free size accounting in mvff.)
...
Copied from Perforce
Change: 185567
ServerID: perforce.ravenbrook.com
2014-04-15 14:23:53 +01:00
Gareth Rees
42f18f93af
Catch-up merge from master/...@185556 to branch/2014-03-30/addrset.
...
Copied from Perforce
Change: 185563
ServerID: perforce.ravenbrook.com
2014-04-15 13:14:50 +01:00
Gareth Rees
93a79ac8a6
Add -wconversion to the options for gcc. ensure that the mps builds.
...
Copied from Perforce
Change: 185463
ServerID: perforce.ravenbrook.com
2014-04-11 14:25:15 +01:00
Gareth Rees
b90f8b9bcd
Use cbs subclasses to implement the fast-find and find-in-zones features. this avoids the need to control behaviour by passing booleans, and it means that there is no wasted space in the cbs block structure when these features are not used.
...
Bring splay tree design up to date; add missing diagrams; move it to the "current" section of the manual.
Copied from Perforce
Change: 185294
ServerID: perforce.ravenbrook.com
2014-04-07 15:36:18 +01:00
Gareth Rees
ce6b34aa8f
Test the failover module (both always and never failing over).
...
Fix result code bug in failoverInsert.
Test all result codes in fotest.
Tidy up code and documentation.
Copied from Perforce
Change: 185207
ServerID: perforce.ravenbrook.com
2014-04-03 14:46:58 +01:00
Gareth Rees
0b159dc650
New module failover implements a fail-over allocator as a land class.
...
Use Failover in MVT and MVFF.
Test Failover in landtest.
Implementation of LandFindInZones for Freelist (untested).
Remove signature from RangeStruct so we can embed it without a space cost.
Copied from Perforce
Change: 185196
ServerID: perforce.ravenbrook.com
2014-04-03 12:52:23 +01:00
Gareth Rees
b409ae89f6
Turn freelist into a land class.
...
Copied from Perforce
Change: 185155
ServerID: perforce.ravenbrook.com
2014-04-02 14:01:18 +01:00
Gareth Rees
d2cbfda452
First pass at implementation of lands (collections of address ranges). 100% boilerplate!
...
Copied from Perforce
Change: 185131
ServerID: perforce.ravenbrook.com
2014-04-01 19:51:55 +01:00
Richard Brooksby
061eba523c
Reponding to code review < https://info.ravenbrook.com/mail/2014/03/10/17-01-58/0/ >.
...
Renaming the arena’s “zoned CBS” back to earlier “free CBS”, especially since it might not be zoned.
Copied from Perforce
Change: 184738
ServerID: perforce.ravenbrook.com
2014-03-11 17:27:57 +00:00