Gareth Rees
f154b62bf4
Catch-up merge from master sources to mps/branch/2013-05-17/emergency
...
Copied from Perforce
Change: 182417
ServerID: perforce.ravenbrook.com
2013-06-03 12:25:18 +01:00
Gareth Rees
5a508d2178
Run apss test in a client arena as well as vm arenas.
...
Copied from Perforce
Change: 182416
ServerID: perforce.ravenbrook.com
2013-06-03 12:19:55 +01:00
Gareth Rees
e07ee8b8e3
Make expt825 and awlutth test cases build on os x.
...
Add exposet0, expt825 and zmess test cases to test suite on OS X.
Copied from Perforce
Change: 182415
ServerID: perforce.ravenbrook.com
2013-06-03 12:18:05 +01:00
Gareth Rees
b764d4b19d
Improve organization of comm.gmk:
...
* Mention each target once (this makes it more reliable to modify the set of targets).
* Include exposet0, expt825 and xmess in the automatically run test cases.
* For other test cases, explain why not included in automated test suite.
* Organize targets alphabetically (this is makes it easier to check the lists against each other).
Copied from Perforce
Change: 182413
ServerID: perforce.ravenbrook.com
2013-06-03 11:35:01 +01:00
Gareth Rees
d959e65927
Missing prototypes for freelistfindfirst and freelistfindlast.
...
Copied from Perforce
Change: 182411
ServerID: perforce.ravenbrook.com
2013-06-03 11:08:58 +01:00
Gareth Rees
0260380dd3
Rename cbstest.c to fbmtest.c (free block management test) and generalize it so that it tests both the cbs and freelist modules.
...
Split FreelistFind into FreelistFindFirst and FreelistFindLast so that the interface exactly matches the CBS interface.
Fix errors in freelist.c: missing computation of size in FreelistBlockSetLimit; update linked list correct in coalesceRight case in FreelistInsert.
Avoid compiler warnings in freelist.c.
In cbs.c: use $U for Booleans ($B is for bit tables).
Copied from Perforce
Change: 182397
ServerID: perforce.ravenbrook.com
2013-06-02 21:34:23 +01:00
Gareth Rees
db9328da7a
Use range objects in the cbs interface instead of base, limit pairs. the idea is that freelist and cbs should offer similar interfaces so that the testing code can be shared.
...
Copied from Perforce
Change: 182364
ServerID: perforce.ravenbrook.com
2013-05-31 16:29:26 +01:00
Gareth Rees
83aff660e2
Use a tag in the bottom bit to distinguish grains and blocks in the free list. this results in much simplification of the code.
...
Copied from Perforce
Change: 182362
ServerID: perforce.ravenbrook.com
2013-05-31 13:41:36 +01:00
Gareth Rees
915a41123c
Fix iteration in freelistfindlargest.
...
Copied from Perforce
Change: 182359
ServerID: perforce.ravenbrook.com
2013-05-31 10:44:02 +01:00
Gareth Rees
e26cba758a
Mustn't use aver in describe functions.
...
Copied from Perforce
Change: 182358
ServerID: perforce.ravenbrook.com
2013-05-31 10:43:38 +01:00
Gareth Rees
04f2738a18
Improve documentation. fix off-by-one errors in the setprevnext functions.
...
Copied from Perforce
Change: 182350
ServerID: perforce.ravenbrook.com
2013-05-31 00:41:28 +01:00
Gareth Rees
032657464b
New "freelist" module implementes a simple address-ordered linked list allocator (based on the "emergency list" allocator that was formerly part of the cbs module).
...
Copied from Perforce
Change: 182348
ServerID: perforce.ravenbrook.com
2013-05-31 00:12:49 +01:00
Gareth Rees
934ae05ca3
Rename the enumeration cbsfinddelete to finddelete in anticipation of it being shared between cbs and new freelist module.
...
Since ABQDisposition enumeration only has two values, it's better to use Bool.
Copied from Perforce
Change: 182347
ServerID: perforce.ravenbrook.com
2013-05-31 00:09:33 +01:00
Gareth Rees
caf1945985
Clarify the logic in cbsinsertintotree to match cbsdeletefromtree.
...
Copied from Perforce
Change: 182344
ServerID: perforce.ravenbrook.com
2013-05-30 20:09:01 +01:00
Gareth Rees
71ab5adf66
Separate block allocation from block insertion, so that cbsdeletefromtree no longer leaves the tree in an inconsistent state if allocation fails.
...
Simplify the case logic in cbsDeleteFromTree to try to make it clearer.
Explain why cbsDeleteFromTree can't fail when it's called from cbsFindDeleteRange.
Copied from Perforce
Change: 182342
ServerID: perforce.ravenbrook.com
2013-05-30 19:22:56 +01:00
Gareth Rees
aa16236b2a
Ansi i/o module checks its arguments using aver.
...
Copied from Perforce
Change: 182327
ServerID: perforce.ravenbrook.com
2013-05-30 16:21:42 +01:00
Gareth Rees
dad0cabdf7
Guard the calls to mps_io_flush so that it can only be called after mps_io_create.
...
Copied from Perforce
Change: 182322
ServerID: perforce.ravenbrook.com
2013-05-30 15:24:41 +01:00
Gareth Rees
87019f4ee2
Fix review comments from < https://info.ravenbrook.com/mail/2013/05/28/22-21-11/0/ >:
...
* Rename RangeOverlap to RangesOverlap.
* MVFF shouldn't assume that CBSInsert and CBSDelete can't fail.
* Remove unused function mps_mvff_stat.
* Don't call range methods in RangeCheck.
* RangeInit can't fail, so return void.
Copied from Perforce
Change: 182297
ServerID: perforce.ravenbrook.com
2013-05-29 12:19:19 +01:00
Gareth Rees
30d713920b
Add mvt to ap stress test.
...
Copied from Perforce
Change: 182269
ServerID: perforce.ravenbrook.com
2013-05-27 21:48:06 +01:00
Gareth Rees
3aa19f30a4
Assert instead of crashing in mps_arena_destroy when the client has failed to destroy some data structures.
...
Also, don't forget to finish the chainRing.
Copied from Perforce
Change: 182258
ServerID: perforce.ravenbrook.com
2013-05-27 12:58:05 +01:00
Gareth Rees
4bd6bde604
Mfs now rounds unitsize up to unit_min instead of asserting.
...
Copied from Perforce
Change: 182257
ServerID: perforce.ravenbrook.com
2013-05-27 10:19:35 +01:00
Gareth Rees
b6c356d1d8
Snc requires a format, so it needs a varargs decoder.
...
Copied from Perforce
Change: 182256
ServerID: perforce.ravenbrook.com
2013-05-27 10:14:38 +01:00
Richard Brooksby
5c6785b815
Catch-up merge from custom/cet/main to master.
...
Includes installable assertion handler, events in circular memory buffers, LARGEADDRESSAWARE, etc.
Copied from Perforce
Change: 182176
ServerID: perforce.ravenbrook.com
2013-05-24 19:42:46 +01:00
Gareth Rees
ba1a45d970
Catch-up merge from master sources to mps/branch/2013-05-17/emergency.
...
Copied from Perforce
Change: 182170
ServerID: perforce.ravenbrook.com
2013-05-24 18:44:18 +01:00
Gareth Rees
da75b40c73
Always run all the testcases, noting failures instead of stopping.
...
Copied from Perforce
Change: 182153
ServerID: perforce.ravenbrook.com
2013-05-24 11:25:15 +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
Gareth Rees
09b845a726
Catch-up merge from the master sources to branch/2013-05-17/emergency.
...
Copied from Perforce
Change: 182135
ServerID: perforce.ravenbrook.com
2013-05-23 20:58:21 +01:00
Gareth Rees
8396204108
Ensure that the random seed is not lost in case of failure.
...
Copied from Perforce
Change: 182131
ServerID: perforce.ravenbrook.com
2013-05-23 20:10:36 +01:00
Gareth Rees
0206d9feb2
Amcssth need to be added "all" as well as testcases.
...
Copied from Perforce
Change: 182129
ServerID: perforce.ravenbrook.com
2013-05-23 20:06:45 +01:00
Gareth Rees
3c48eff730
On platform lii6gc, the mps needs a bunch of symbols which are not defined if the -ansi option is given to gcc. these can be enabled by defining features like _gnu_source, but all headers share a common set of features (via <feature.h>) and so all sources in the same compilation unit must turn on the same set of features. make sure this happens by turning on the features in config.h (not mpstd.h).
...
Remove <string.h> from mpsi.h (not needed).
Copied from Perforce
Change: 182124
ServerID: perforce.ravenbrook.com
2013-05-23 19:35:47 +01:00
Richard Brooksby
5d5e2cac05
Deleting some obsolete comment text about callbacks.
...
Renaming cbsBlockShrink to cbsBlockShrunk and cbsBlockGrow to cbsBlockGrew, since they don't *do* those things, just record that they were done.
Tidying up Find functions, where deletion of emergency code had left some strange double nestings.
Copied from Perforce
Change: 182120
ServerID: perforce.ravenbrook.com
2013-05-23 19:05:25 +01:00
Richard Brooksby
af707b5d97
Clarifying comment about extra queue element
...
Copied from Perforce
Change: 182119
ServerID: perforce.ravenbrook.com
2013-05-23 19:04:42 +01:00
Gareth Rees
ef4c41df55
Ensure the emergency branch compiles and runs on lii6gc:
...
No need for <string.h> in mpsi.c (this defines a function "index" on Linux).
Need more headers in range.c so that it will compile on its own.
Need UNUSED() declarations for some variables in cbstest.c.
Copied from Perforce
Change: 182113
ServerID: perforce.ravenbrook.com
2013-05-23 13:42:08 +01:00
Gareth Rees
ad523a34ef
Remove unused variable oldsize.
...
Copied from Perforce
Change: 182111
ServerID: perforce.ravenbrook.com
2013-05-23 12:50:57 +01:00
Gareth Rees
9bd5347700
Catch-up merge from master to branch/2013-05-17/emergency
...
Copied from Perforce
Change: 182110
ServerID: perforce.ravenbrook.com
2013-05-23 12:46:04 +01:00
Gareth Rees
439a5958b2
Avoid undefined behaviour in ring_elt by using parent (and thus offsetof) instead of deferencing a null pointer. add missing typedef for rememberedsummaryblockstruct. update ring design accordingly.
...
Copied from Perforce
Change: 182084
ServerID: perforce.ravenbrook.com
2013-05-22 16:45:45 +01:00
Richard Brooksby
62e3734297
Adding missing check on return value found by xcode analyzer.
...
Copied from Perforce
Change: 182071
ServerID: perforce.ravenbrook.com
2013-05-22 12:29:10 +01:00
Gareth Rees
5af8afd540
New function rangeisaligned; add avert to other range functions.
...
Copied from Perforce
Change: 182069
ServerID: perforce.ravenbrook.com
2013-05-22 09:41:45 +01:00
Gareth Rees
e40f8440dc
Follow rules in design/sig.
...
Copied from Perforce
Change: 182052
ServerID: perforce.ravenbrook.com
2013-05-21 18:41:03 +01:00
Gareth Rees
964fe2954e
The abq module manages objects internal to the mps (not client objects) so it should use the type void * in its interface, not addr.
...
Copied from Perforce
Change: 182051
ServerID: perforce.ravenbrook.com
2013-05-21 18:39:51 +01:00
Gareth Rees
5ea309b5cc
Catch-up merge from master sources to branch/2013-05-17/emergency.
...
Copied from Perforce
Change: 182048
ServerID: perforce.ravenbrook.com
2013-05-21 18:31:50 +01:00
Gareth Rees
6ff6df0813
In mv2test, use the random number generator from testlib. (this reduces duplication and makes test cases repeatable.)
...
Copied from Perforce
Change: 182046
ServerID: perforce.ravenbrook.com
2013-05-21 17:56:36 +01:00
Gareth Rees
f306ba4b47
Show the output of the test case that failed. (on linux.)
...
Copied from Perforce
Change: 182044
ServerID: perforce.ravenbrook.com
2013-05-21 17:34:35 +01:00
Gareth Rees
69ef2cbe09
If a test case fails, show the output of the test case that failed, so that it isn't lost if the test suite is running on a build server such as travis ci. (works on os x.)
...
Copied from Perforce
Change: 182040
ServerID: perforce.ravenbrook.com
2013-05-21 17:25:13 +01:00
Gareth Rees
515241d9e0
Improve description of mvtdeleteoverlapping.
...
Copied from Perforce
Change: 182038
ServerID: perforce.ravenbrook.com
2013-05-21 15:51:51 +01:00
Gareth Rees
2c47024e35
Range design.
...
Copied from Perforce
Change: 182035
ServerID: perforce.ravenbrook.com
2013-05-21 14:52:27 +01:00
Gareth Rees
309a62008a
Refactor mvt so that blocks are pushed onto the abq in just one place.
...
Fix bug in MVTDelete: need to remove the whole of the old range from the ABQ, not just the range we're deleting.
Copied from Perforce
Change: 182032
ServerID: perforce.ravenbrook.com
2013-05-21 13:35:41 +01:00
Gareth Rees
b0a0c35869
Don't describe the pool at the end of mv2test.
...
Copied from Perforce
Change: 182031
ServerID: perforce.ravenbrook.com
2013-05-21 13:33:20 +01:00
Gareth Rees
4ff81d94e7
Cbsdescribe provides more information about the cbs.
...
Copied from Perforce
Change: 182030
ServerID: perforce.ravenbrook.com
2013-05-21 13:25:17 +01:00
Gareth Rees
943b0c5fe8
Add function versions of range{base,limit,size} macros: these can be useful when debugging.
...
Copied from Perforce
Change: 182029
ServerID: perforce.ravenbrook.com
2013-05-21 13:20:29 +01:00