Richard Brooksby
cd4a12047f
Non-working preferential allocation within a block of the cbs.
...
This doesn't work because the splay tree can't cope with homing in on a node (that appears big enough) then being told that it isn't suitable (because it doesn't have space in the right zone). The splay tree summary condition must be precise, as stated in the design. The splay tree isn't suited to this kind of search.
Copied from Perforce
Change: 184073
ServerID: perforce.ravenbrook.com
2014-01-21 16:29:30 +00:00
Richard Brooksby
6954977079
First draft of allocating using the freecbs. arenaalloc finds a free address range in the cbs and asks the arena class to mark it allocated, rather than the arena class doing the search. plenty still missing. no freeing.
...
Copied from Perforce
Change: 184050
ServerID: perforce.ravenbrook.com
2014-01-18 17:16:10 +00:00
Richard Brooksby
9eeaa3a388
Inlining the mfs block pool's structure into its parent mfs, to avoid allocating in the control pool when initialising a cbs. this will allow the cbs to be used before the control pool exists.
...
Copied from Perforce
Change: 184043
ServerID: perforce.ravenbrook.com
2014-01-17 15:48:12 +00:00
Gareth Rees
e6605cc39c
Tidying up in anticipation of review.
...
Copied from Perforce
Change: 182524
ServerID: perforce.ravenbrook.com
2013-06-04 23:49:48 +01:00
Gareth Rees
ca36e1a147
Cbsdelete() now returns the isolated contiguous range that was found, even if the requested deletion operation cannot be performed. (this is so that the caller can try deleting the whole block instead and manage the fragments using a fallback strategy.)
...
CBSFindLargest() takes a size argument, so that the caller doesn't have to re-insert the found block if it wasn't large enough.
Copied from Perforce
Change: 182431
ServerID: perforce.ravenbrook.com
2013-06-03 16:16:04 +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
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
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
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
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
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
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
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
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
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
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
Richard Brooksby
3189ccfc9b
Consolidating common pool keywords.
...
Copied from Perforce
Change: 181649
ServerID: perforce.ravenbrook.com
2013-05-09 00:06:07 +01:00
Richard Brooksby
07f446a450
Converting pools to use keyword arguments, mostly, and so far inconsistently, but at least it compiles.
...
Copied from Perforce
Change: 181635
ServerID: perforce.ravenbrook.com
2013-05-08 16:21:12 +01:00
Richard Brooksby
cb8f0ea514
Removing unnecessary unused declarations since changelist 179690.
...
Copied from Perforce
Change: 179691
ServerID: perforce.ravenbrook.com
2012-09-25 23:34:20 +01:00
Richard Brooksby
27c6706791
Merging branch/2012-08-21/diagnostic-telemetry.
...
Copied from Perforce
Change: 179289
ServerID: perforce.ravenbrook.com
2012-09-05 23:45:31 +01:00
Richard Brooksby
5333e6d525
Checking and suppressing warnings caused by higher level of optimisation and building from mps.c on ubuntu 12.
...
Copied from Perforce
Change: 179194
ServerID: perforce.ravenbrook.com
2012-09-03 13:38:53 +01:00
Richard Brooksby
89a685f164
Renaming some check* macros with more accurate names, making remaining check* macros similar in function.
...
Copied from Perforce
Change: 179155
ServerID: perforce.ravenbrook.com
2012-09-01 10:18:08 +01:00
Richard Brooksby
4009b8a559
Abolishing eventgen.pl. event structures are now expanded by the preprocessor.
...
Abolishing event formats. Each event now has its own structure.
Event parameters are now written directly into the event buffer, rather than being copied twice.
Copied from Perforce
Change: 179010
ServerID: perforce.ravenbrook.com
2012-08-21 22:48:11 +01:00
Richard Brooksby
61890da12b
Fixing up occurences of "unsigned long" in the main mps and test code so that we no longer assume that "unsigned long" is large enough for a pointer or size, or that it's the longest available integer type, since these are not true on 64-bit windows.
...
Copied from Perforce
Change: 178021
ServerID: perforce.ravenbrook.com
2012-04-23 16:20:40 +01:00
Richard Brooksby
382d044e97
Cbs and splay now pass size through as closure parameters, rather than messing with unsigned long.
...
Copied from Perforce
Change: 177816
ServerID: perforce.ravenbrook.com
2012-03-27 17:15:25 +01:00
Richard Brooksby
e854cd8e1d
Merging branch mps/2002-05-22/open-source-prep.
...
Making some new files consistent with changes from that branch.
Deleting some new Global Graphics confidential files.
Copied from Perforce
Change: 30256
ServerID: perforce.ravenbrook.com
2002-06-18 16:19:34 +01:00
Nick Barnes
6a1a360814
Integrate changes from global graphics.
...
Copied from Perforce
Change: 30250
ServerID: perforce.ravenbrook.com
2002-06-18 14:14:55 +01:00
Richard Brooksby
78ef580722
Eliminating "impl" type tags and replacing them with uri-style file references.
...
Copied from Perforce
Change: 29900
ServerID: perforce.ravenbrook.com
2002-06-07 17:34:59 +01:00
Richard Brooksby
97075f7053
Updating cross references to design documents to html style, to go with master/design document tree.
...
Copied from Perforce
Change: 29897
ServerID: perforce.ravenbrook.com
2002-06-07 16:47:14 +01:00
Richard Brooksby
a0f676c8e1
Adding forward reference to licenses from copyright notices.
...
Adding licenses to a couple of files I missed.
Copied from Perforce
Change: 29837
ServerID: perforce.ravenbrook.com
2002-06-06 11:56:19 +01:00
Richard Brooksby
4301a6db0a
Adding licenses to source code files.
...
Copied from Perforce
Change: 29836
ServerID: perforce.ravenbrook.com
2002-06-06 11:44:23 +01:00
Nick Barnes
db4b3a6fa5
Remove trailing whitespace.
...
Copied from Perforce
Change: 25309
ServerID: perforce.ravenbrook.com
2001-12-17 15:18:17 +00:00
Richard Brooksby
c0bb4cd3cd
Removing hopenames from the master sources.
...
This change will be integrated but ignored (-ay) to the gg-epcore/union sources, so that they retain HopeNames.
Copied from Perforce
Change: 24911
ServerID: perforce.ravenbrook.com
2001-12-07 13:19:25 +00:00
Richard Brooksby
3d5e2ca85f
Adding hopenames back into the master sources, so that they can be included in the union sources along with the id keywords.
...
This was achieved by partially undoing changelist 24817, including an accidental corruption of eventgen.pl.
Copied from Perforce
Change: 24877
ServerID: perforce.ravenbrook.com
2001-12-06 18:14:02 +00:00
Richard Brooksby
b824e1c406
Updating copyright messages to say copyright 2001 ravenbrook throughout.
...
Adding some missing copyright messages.
Copied from Perforce
Change: 24818
ServerID: perforce.ravenbrook.com
2001-12-05 16:18:43 +00:00
Richard Brooksby
2589307099
Changing hopename keywords to id keywords throughout, to work with perforce.
...
Copied from Perforce
Change: 24817
ServerID: perforce.ravenbrook.com
2001-12-05 16:05:52 +00:00
Richard Brooksby
492dd3c684
Merging changes from union to masters. this incorporates pekka's updates: tuning and a type in amcsshe.c and some adding some missing checks in arenavm.c. it also brings our cope of their hopenames up to date.
...
Copied from Perforce
Change: 24815
ServerID: perforce.ravenbrook.com
2001-12-05 15:48:24 +00:00
Nick Barnes
7acfca905d
Branch imports for masters.
...
Copied from Perforce
Change: 23678
ServerID: perforce.ravenbrook.com
2001-10-31 14:40:56 +00:00