Gareth Rees
e7559cf22f
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
fcc50ead4c
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
467c38a37a
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
ae5a06f21b
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
19cee3cdc4
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
9da43c088a
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
82da980c32
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
46ca22c648
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
be2a983861
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
aab4d37ce5
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
a2db9c9770
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
61743c36b4
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
98ba0e67a5
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
67f08731c7
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
a7c70df226
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
4aaef08a42
Remove unused variable oldsize.
...
Copied from Perforce
Change: 182111
ServerID: perforce.ravenbrook.com
2013-05-23 12:50:57 +01:00
Gareth Rees
1868115978
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
870bea6e2d
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
4b22229ef5
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
69c8559583
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
6d0b5ec1fa
Follow rules in design/sig.
...
Copied from Perforce
Change: 182052
ServerID: perforce.ravenbrook.com
2013-05-21 18:41:03 +01:00
Gareth Rees
3ab93fc8a6
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
0ff7dacbb8
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
eab1715183
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
93f329f7ef
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
ae5e9a15ca
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
6401faf722
Improve description of mvtdeleteoverlapping.
...
Copied from Perforce
Change: 182038
ServerID: perforce.ravenbrook.com
2013-05-21 15:51:51 +01:00
Gareth Rees
c1b38d0423
Range design.
...
Copied from Perforce
Change: 182035
ServerID: perforce.ravenbrook.com
2013-05-21 14:52:27 +01:00
Gareth Rees
ebfa878f52
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
b5ddb6710d
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
5b5f5b8050
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
a3e4f9f493
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
Gareth Rees
6c74d9685c
Include mv2test in the test suite (although it doesn't pass yet).
...
Copied from Perforce
Change: 182027
ServerID: perforce.ravenbrook.com
2013-05-21 00:30:20 +01:00
Gareth Rees
9416fd6cf2
A little bit more checking.
...
Copied from Perforce
Change: 182026
ServerID: perforce.ravenbrook.com
2013-05-21 00:29:56 +01:00
Gareth Rees
40911f20ab
No need for abqdelete: use abqiterate instead.
...
Copied from Perforce
Change: 182024
ServerID: perforce.ravenbrook.com
2013-05-20 23:47:20 +01:00
Gareth Rees
03d76e0962
Add abq and range modules to mps core; add poolmv2 to supported pools.
...
Copied from Perforce
Change: 182021
ServerID: perforce.ravenbrook.com
2013-05-20 23:21:24 +01:00
Gareth Rees
28fc475b2a
Use the new cbs, abq and range interfaces to avoid re-entrancy problems in callbacks.
...
Copied from Perforce
Change: 182017
ServerID: perforce.ravenbrook.com
2013-05-20 20:47:41 +01:00
Gareth Rees
d1fdfa6277
Use the new cbs interface.
...
Copied from Perforce
Change: 182016
ServerID: perforce.ravenbrook.com
2013-05-20 20:47:10 +01:00
Gareth Rees
cc7e7c0172
New module range handles common operations on address ranges.
...
Copied from Perforce
Change: 182015
ServerID: perforce.ravenbrook.com
2013-05-20 20:45:52 +01:00
Gareth Rees
4b970759be
Make the cbs module more abstract by removing cbsblock from the public interface. avoid re-entrancy problems by removing the callback interface. public interfaces like cbsiteratemethod now operate in terms of address ranges rather than cbsblocks.
...
The functions CBSInsert, CBSDelete and CBSFind* now additionally return an "old" address range which gives the former base and limit of the block that has just been updated. This gives clients enough information to update their caches if need be.
Update CBS test and design accordingly.
Copied from Perforce
Change: 182014
ServerID: perforce.ravenbrook.com
2013-05-20 20:45:26 +01:00
Gareth Rees
2987b9fc04
Make the abq module manage elements of arbitrary type (knowing only their address and size) instead of managing cbsblock only. (this is preparatory to removing cbsblock from the cbs public interface.)
...
Update abqtest to use the new interface.
Add ABQ design.
Copied from Perforce
Change: 182013
ServerID: perforce.ravenbrook.com
2013-05-20 20:40:16 +01:00
Richard Brooksby
9f7a30bfbc
Preventing failure if there is an assertion before event buffers are initialized.
...
Copied from Perforce
Change: 182012
ServerID: perforce.ravenbrook.com
2013-05-20 19:37:59 +01:00
Richard Brooksby
8f4f17e745
Renaming some local variables from "index" to "indx" to avoid shadowing the function "index".
...
Only certain versions of GCC seem to warn about this, but they include 4.6.3 being used by Tracis CI causing this failure <https://travis-ci.org/Ravenbrook/mps-temporary/builds/7322161 >.
Copied from Perforce
Change: 182011
ServerID: perforce.ravenbrook.com
2013-05-20 19:37:18 +01:00
Richard Brooksby
67c9cd6c4f
Gcc 4.7.3 on ubuntu 13 has stricter alias checking. disabling for now.
...
Copied from Perforce
Change: 182001
ServerID: perforce.ravenbrook.com
2013-05-20 16:33:28 +01:00
Richard Brooksby
1f883a6097
Arg.c was never added to comm.gmk, breaking the linux build.
...
Copied from Perforce
Change: 182000
ServerID: perforce.ravenbrook.com
2013-05-20 16:32:24 +01:00
Richard Brooksby
234e6c0226
Removing dependency on standard c library memcpy. oops.
...
Copied from Perforce
Change: 181999
ServerID: perforce.ravenbrook.com
2013-05-20 16:31:34 +01:00
Richard Brooksby
a7d9cfdbfe
Fixing bogus comparison in assertion found by gcc warnings on linux.
...
Copied from Perforce
Change: 181998
ServerID: perforce.ravenbrook.com
2013-05-20 16:30:59 +01:00
Richard Brooksby
60f7df4335
Adjusting the default extend_by of the mv pool to be more sensible and match the other pools, but overriding it in the case of the arena control pool, where the default originated.
...
Copied from Perforce
Change: 181946
ServerID: perforce.ravenbrook.com
2013-05-19 20:01:52 +01:00
Gareth Rees
e0e34a1c98
Remove "emergency" free list allocator from the cbs module (it belongs in its own module) and update clients and the design accordingly.
...
Copied from Perforce
Change: 181927
ServerID: perforce.ravenbrook.com
2013-05-19 14:27:24 +01:00
Richard Brooksby
690db0f51d
Catch up merge from mps master to keyword arguments development branch.
...
Copied from Perforce
Change: 181890
ServerID: perforce.ravenbrook.com
2013-05-17 14:37:48 +01:00