1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 08:41:47 -07:00
Commit graph

1050 commits

Author SHA1 Message Date
Gareth Rees
ccbf5341e8 Mvtfinish must make the structure invalid first.
Add comment explaining choice of GCSegClass.

Copied from Perforce
 Change: 182608
 ServerID: perforce.ravenbrook.com
2013-06-07 15:39:07 +01:00
Gareth Rees
4753e1ba3a Improve design docs following review from rb.
Copied from Perforce
 Change: 182606
 ServerID: perforce.ravenbrook.com
2013-06-07 14:50:22 +01:00
Gareth Rees
ddf49ff7e9 Mvt takes configurable alignment via a keyword argument.
Copied from Perforce
 Change: 182605
 ServerID: perforce.ravenbrook.com
2013-06-07 14:45:14 +01:00
Gareth Rees
c44b1e0e31 Check that all addresses in the freed range belong to the pool, not just the base of the range.
Copied from Perforce
 Change: 182602
 ServerID: perforce.ravenbrook.com
2013-06-07 13:20:20 +01:00
Gareth Rees
08f28c589a Fix function description.
Copied from Perforce
 Change: 182601
 ServerID: perforce.ravenbrook.com
2013-06-07 13:17:21 +01:00
Gareth Rees
bcb3aeacde Oops, forgot fl argument to freelistblocklimit.
Copied from Perforce
 Change: 182586
 ServerID: perforce.ravenbrook.com
2013-06-06 15:58:02 +01:00
Gareth Rees
f651dbdc27 Extra-careful check after setting the limit.
Copied from Perforce
 Change: 182585
 ServerID: perforce.ravenbrook.com
2013-06-06 15:51:41 +01:00
Gareth Rees
fe60d16407 Represent a block on the free list as a freelistblock rather than an addr (for better type safety). add many checks.
Copied from Perforce
 Change: 182584
 ServerID: perforce.ravenbrook.com
2013-06-06 15:47:37 +01:00
Gareth Rees
4232dc3125 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
a027b2b217 Build and run on windows.
Copied from Perforce
 Change: 182519
 ServerID: perforce.ravenbrook.com
2013-06-04 20:52:40 +01:00
Gareth Rees
20c26254ae Catch-up merge from master sources to mps/branch/2013-05-17/emergency.
Copied from Perforce
 Change: 182518
 ServerID: perforce.ravenbrook.com
2013-06-04 20:44:03 +01:00
Gareth Rees
86abc26355 Avoid "variable may be used uninitialized" warning from visual c.
Copied from Perforce
 Change: 182517
 ServerID: perforce.ravenbrook.com
2013-06-04 20:41:19 +01:00
Gareth Rees
b631cd10cd Reorganize windows build so that facts are mentioned in only one place.
Provide "testrun" target (and batch file) for running the test suite.

Copied from Perforce
 Change: 182516
 ServerID: perforce.ravenbrook.com
2013-06-04 20:40:07 +01:00
Gareth Rees
418cb379a2 Avoid "variable may be used uninitialized" warnings.
Copied from Perforce
 Change: 182513
 ServerID: perforce.ravenbrook.com
2013-06-04 18:46:07 +01:00
Gareth Rees
3515defcdd Make fotest run on lii6gc.
Copied from Perforce
 Change: 182512
 ServerID: perforce.ravenbrook.com
2013-06-04 18:40:52 +01:00
Gareth Rees
fbf674c3ed Mvt now fails over from a cbs to a freelist.
Update test cases and design accordingly.

Copied from Perforce
 Change: 182509
 ServerID: perforce.ravenbrook.com
2013-06-04 18:16:32 +01:00
Gareth Rees
e5ad686f7c Encapsulate cbsfindlargest falling back to freelistfindlargest as suggested by rb in review.
Copied from Perforce
 Change: 182502
 ServerID: perforce.ravenbrook.com
2013-06-04 17:10:38 +01:00
Gareth Rees
67ab8d1385 New test case "fotest" for fail-over of cbs to freelist in mvff. (plus stub for mvt.) need some testing hooks in mvff and mvt for getting the cbs.
This reveals a couple of bugs in MVFF: (i) if CBSDelete fails, this might be because the block is actually on the Freelist instead; (ii) we can't SegFree before calling FreelistDelete because the Freelist needs access to the memory in order to read its pointers.

Copied from Perforce
 Change: 182500
 ServerID: perforce.ravenbrook.com
2013-06-04 16:51:24 +01:00
Gareth Rees
757a6417fb Missing extern.
Copied from Perforce
 Change: 182496
 ServerID: perforce.ravenbrook.com
2013-06-04 15:40:45 +01:00
Gareth Rees
577342271d Call abort() instead of exit() for convenience when debugging.
Copied from Perforce
 Change: 182495
 ServerID: perforce.ravenbrook.com
2013-06-04 15:37:12 +01:00
Gareth Rees
662a59c297 In mvff, fall back from cbs to freelist if cbs fails.
Copied from Perforce
 Change: 182434
 ServerID: perforce.ravenbrook.com
2013-06-03 16:21:52 +01:00
Gareth Rees
e5b8cf82d8 Add fbmtest to test suite.
Copied from Perforce
 Change: 182433
 ServerID: perforce.ravenbrook.com
2013-06-03 16:21:32 +01:00
Gareth Rees
6efd6ba489 Freelistfindlargest() takes a size argument so that the interface matches cbsfindlargest().
New function FreelistFlushToCBS() tries to move all blocks out of a free list and into a CBS.

Copied from Perforce
 Change: 182432
 ServerID: perforce.ravenbrook.com
2013-06-03 16:17:28 +01:00
Gareth Rees
5fb6436dd0 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
86221fe9f3 Use rnd() from testlib instead for rand() from libc, so that test case is repeatable.
Copied from Perforce
 Change: 182430
 ServerID: perforce.ravenbrook.com
2013-06-03 16:05:19 +01:00
Gareth Rees
5f5d4a8a88 Make sure fbmtest compiles and runs on lii6gc.
Copied from Perforce
 Change: 182425
 ServerID: perforce.ravenbrook.com
2013-06-03 13:08:55 +01:00
Gareth Rees
bb56e5bd24 Add freelist module to core mps.
Copied from Perforce
 Change: 182422
 ServerID: perforce.ravenbrook.com
2013-06-03 12:58:12 +01:00
Richard Brooksby
99080a30f6 Miscellaneous design document improvements.
Documenting why WriteF on points comes out with the wrong endianness on Intel platforms.

Copied from Perforce
 Change: 182421
 ServerID: perforce.ravenbrook.com
2013-06-03 12:57:55 +01:00
Gareth Rees
5d0a3d48d9 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
6c808aac63 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
e7487e1c71 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
21810fbccd 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
abdabf9c7b 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
7dc558b489 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
71a2c572a0 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
9b3153f8b6 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
b892fdfbb9 Fix iteration in freelistfindlargest.
Copied from Perforce
 Change: 182359
 ServerID: perforce.ravenbrook.com
2013-05-31 10:44:02 +01:00
Gareth Rees
20865f6705 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
e3d76b37da 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
ca7975ac29 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
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
4c937daab2 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
a344ce6284 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
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
24117edcd8 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
d4adc57d0c 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
8774e59227 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