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
Gareth Rees
ecb45f24d2
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
bb47703f30
A little bit more checking.
...
Copied from Perforce
Change: 182026
ServerID: perforce.ravenbrook.com
2013-05-21 00:29:56 +01:00
Gareth Rees
63207e0200
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
9e25483815
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
48e439d624
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
1912c062b5
Use the new cbs interface.
...
Copied from Perforce
Change: 182016
ServerID: perforce.ravenbrook.com
2013-05-20 20:47:10 +01:00
Gareth Rees
082f12d68e
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
2849a0bd33
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
df1a8a3807
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
68c312f9ba
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
9cd658a534
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
2742a7aac4
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
07e043adee
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
6369f90c87
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
789262957c
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
b19ac90ba0
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
217831cc47
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
a3d15bbdb0
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
Richard Brooksby
f876b80dff
Fixing the mvff documentation to say that the keyword arguments are optional, and documenting their default values.
...
Attaching the note about some keywords not affecting allocation points to those keywords with a footnote reference.
Fixing the default alignment setting to MVFF pool to MPS_PF_ALIGN.
Copied from Perforce
Change: 181874
ServerID: perforce.ravenbrook.com
2013-05-16 18:12:54 +01:00
Richard Brooksby
6806f70e58
Correcting the documentation of the restrictions on the keyword arguments to the mvff pool class.
...
Copied from Perforce
Change: 181872
ServerID: perforce.ravenbrook.com
2013-05-16 17:40:14 +01:00
Richard Brooksby
f0e9d74c3c
The fragmentation limit argument to the mvt pool class is now passed as a floating point fraction, not a percentage, in the keyword interface.
...
Copied from Perforce
Change: 181862
ServerID: perforce.ravenbrook.com
2013-05-16 13:54:06 +01:00
Gareth Rees
a6550d1536
Use __builtin_readcyclecounter for event_clock if it's available.
...
Copied from Perforce
Change: 181858
ServerID: perforce.ravenbrook.com
2013-05-16 13:37:31 +01:00
Gareth Rees
d4fbeed6f7
Eventclock has enough entropy on all the platforms we support that we can use it to choose the random number seed.
...
Copied from Perforce
Change: 181855
ServerID: perforce.ravenbrook.com
2013-05-16 13:17:42 +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
818a65f36f
Replacing duplicate *trivvarargs methods with a single implementation in args.c.
...
Copied from Perforce
Change: 181851
ServerID: perforce.ravenbrook.com
2013-05-16 13:10:01 +01:00
Richard Brooksby
bb02f55b62
Making clear the size of the array of args passed to varargs conversion methods.
...
Copied from Perforce
Change: 181845
ServerID: perforce.ravenbrook.com
2013-05-16 03:12:11 +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
Richard Brooksby
93fee75c50
Eliminating unnecessary use of varargs in segment split and merge functions.
...
Copied from Perforce
Change: 181842
ServerID: perforce.ravenbrook.com
2013-05-16 03:02:20 +01:00
Gareth Rees
808da8a6e7
Test coverage report on os x.
...
Copied from Perforce
Change: 181822
ServerID: perforce.ravenbrook.com
2013-05-15 19:25:16 +01:00
Gareth Rees
dfce35a35b
Make forward declarations of various functions consistent with their actual declarations.
...
Copied from Perforce
Change: 181788
ServerID: perforce.ravenbrook.com
2013-05-15 14:18:28 +01:00