Gareth Rees
72ba071b4c
Fix arenarootswalk:
...
1. Blacken the segments again after scanning the roots, so that the roots can be walked again.
2. Don't cast RootGrey to a RootIterateFn -- the types are not compatible.
MMQA test function/122.c now passes.
Copied from Perforce
Change: 185530
ServerID: perforce.ravenbrook.com
2014-04-14 23:38:54 +01:00
Gareth Rees
4e48a196e5
Check the poolring so that there is an assertion failure (not a crash) if the client fails to destroy a pool.
...
Copied from Perforce
Change: 185527
ServerID: perforce.ravenbrook.com
2014-04-14 22:31:24 +01:00
Gareth Rees
06ea755daf
Move the marker down the stack so that gcc's aggressive inline won't scupper it.
...
Copied from Perforce
Change: 185524
ServerID: perforce.ravenbrook.com
2014-04-14 18:37:31 +01:00
Gareth Rees
113f2ff5d0
Simpler cast, more checking.
...
Copied from Perforce
Change: 185510
ServerID: perforce.ravenbrook.com
2014-04-14 12:32:18 +01:00
Gareth Rees
e2c67f1bb7
Simpler cast, more checking.
...
Copied from Perforce
Change: 185507
ServerID: perforce.ravenbrook.com
2014-04-14 12:13:31 +01:00
Gareth Rees
97f6f25655
Avoid warning on lii3gc.
...
Copied from Perforce
Change: 185506
ServerID: perforce.ravenbrook.com
2014-04-14 12:13:22 +01:00
Gareth Rees
da2a61ae24
Simpler casting, and more checking.
...
Copied from Perforce
Change: 185505
ServerID: perforce.ravenbrook.com
2014-04-14 12:07:14 +01:00
Gareth Rees
339cc8e364
Simpler casting and more checking.
...
Copied from Perforce
Change: 185502
ServerID: perforce.ravenbrook.com
2014-04-14 11:34:20 +01:00
Gareth Rees
2987353125
Check rings before destroying the control pool, so that you get an assertion when a ring points into space that is about to be unmapped, instead of a crash after it has been unmapped.
...
Copied from Perforce
Change: 185495
ServerID: perforce.ravenbrook.com
2014-04-13 20:51:10 +01:00
Gareth Rees
b1fd10c278
Debug options structures are incompatible with gcc -wwrite-strings.
...
Copied from Perforce
Change: 185493
ServerID: perforce.ravenbrook.com
2014-04-13 19:52:51 +01:00
Gareth Rees
6b4cfb5263
Avoid "cast discards const qualifier from pointer target type" error from gcc.
...
Copied from Perforce
Change: 185491
ServerID: perforce.ravenbrook.com
2014-04-13 19:23:33 +01:00
Gareth Rees
f7dd0b6c46
Provide a default value for mps_key_pool_debug_options.
...
Don't use const in the types of the debugging templates: it's infectious!
Copied from Perforce
Change: 185489
ServerID: perforce.ravenbrook.com
2014-04-13 18:02:10 +01:00
Gareth Rees
02e0595e2f
Comment is no longer true: now handle blocks that span segments.
...
Copied from Perforce
Change: 185487
ServerID: perforce.ravenbrook.com
2014-04-13 10:28:19 +01:00
Gareth Rees
532cd901ac
Avoid strict aliasing warnings from gcc 4.8.
...
Copied from Perforce
Change: 185484
ServerID: perforce.ravenbrook.com
2014-04-12 21:44:18 +01:00
Gareth Rees
3887d08d29
Fix compilation of eventtxt.c on lii6gc.
...
Copied from Perforce
Change: 185483
ServerID: perforce.ravenbrook.com
2014-04-12 21:33:29 +01:00
Gareth Rees
6d923be672
Eventtxt no longer reports an error if there are multiple labels associated with an address. instead, it store all the labels encountered, and prints the one that was in force at the time of each event.
...
Use the MPS to manage memory, not malloc/free.
Recommend sort before mpseventtxt and not afterwards (data is smaller; labelling is more accurate).
Copied from Perforce
Change: 185477
ServerID: perforce.ravenbrook.com
2014-04-12 15:34:43 +01:00
Gareth Rees
28d6cd9612
Use the mps to manage memory in test cases, not malloc!
...
Copied from Perforce
Change: 185474
ServerID: perforce.ravenbrook.com
2014-04-11 21:27:31 +01:00
Gareth Rees
2aef76c48c
Ensure that mpseventsql compiles with gcc -wmissing-variable-declarations.
...
Copied from Perforce
Change: 185473
ServerID: perforce.ravenbrook.com
2014-04-11 21:18:23 +01:00
Gareth Rees
8624638093
Default value for mps_key_arena_size makes it easier to create arenas.
...
Copied from Perforce
Change: 185472
ServerID: perforce.ravenbrook.com
2014-04-11 21:15:09 +01:00
Gareth Rees
20f55386c4
Turn -wconversion off again. (the mps builds with this option with gcc 4.8 but not with gcc 4.6.3 on the travis buildbots.)
...
Copied from Perforce
Change: 185467
ServerID: perforce.ravenbrook.com
2014-04-11 15:28:03 +01:00
Gareth Rees
ab57c07df5
Turn on -wduplicate-enum and -wmissing-variable-declarations options for clang. ensure the mps compiles with these options.
...
Copied from Perforce
Change: 185466
ServerID: perforce.ravenbrook.com
2014-04-11 15:17:20 +01:00
Gareth Rees
391e7e6c83
Add -wconversion to the options for gcc. ensure that the mps builds.
...
Copied from Perforce
Change: 185463
ServerID: perforce.ravenbrook.com
2014-04-11 14:25:15 +01:00
Gareth Rees
fb2443daaa
Fix the build for gcc on os x: gcc warns about the missing return in protcatchthread, but we don't want to add one because that would be unreachable code. so use __attribute__((__noreturn__)) instead.
...
Copied from Perforce
Change: 185461
ServerID: perforce.ravenbrook.com
2014-04-11 12:42:26 +01:00
Gareth Rees
24aef39a77
Not ready for gcc -wconversion.
...
Copied from Perforce
Change: 185459
ServerID: perforce.ravenbrook.com
2014-04-11 12:17:39 +01:00
Gareth Rees
8c63b81342
Add -wconversion to options for gcc and clang.
...
Ensure that the MPS builds with this option with Clang.
Copied from Perforce
Change: 185457
ServerID: perforce.ravenbrook.com
2014-04-11 12:06:28 +01:00
Gareth Rees
b70e268929
Fix problems found by coverity. see < https://info.ravenbrook.com/mail/2014/04/10/23-23-42/0/ > for full analysis.
...
Copied from Perforce
Change: 185445
ServerID: perforce.ravenbrook.com
2014-04-11 00:26:48 +01:00
Gareth Rees
44ec318081
Must ensure the consistency of a segment even if we are just about to free it, because the segment must pass the segcheck inside segfree.
...
Copied from Perforce
Change: 185440
ServerID: perforce.ravenbrook.com
2014-04-10 19:40:42 +01:00
Gareth Rees
665cb2efcc
Don't turn on the alloctable in amsbufferempty when it's shared with nonwhitetable and the colour tables are in use -- this will turn any grey grains in the segment invalid.
...
Add more checking to AMS, including the table use invariant.
Copied from Perforce
Change: 185434
ServerID: perforce.ravenbrook.com
2014-04-10 18:16:29 +01:00
Gareth Rees
25dc0fc073
Document the constraints on the mean and maximum size arguments to the mv pool class. remove documentation from poolmv.h: this is in the manual now.
...
Copied from Perforce
Change: 185432
ServerID: perforce.ravenbrook.com
2014-04-10 15:36:51 +01:00
Gareth Rees
ae09ed50c5
Fix amcssth -- don't try to test two incompatible features at the same time (see job003561).
...
Set the commit limit in amcss and amcsshe so that we test that the MPS can live in a tight memory limit.
Don't try to detect when the MPS has made a "dynamic" collection. This is not reliable or maintainable.
Copied from Perforce
Change: 185430
ServerID: perforce.ravenbrook.com
2014-04-10 15:06:58 +01:00
Gareth Rees
966026b170
Trying to create a freelist with too-small alignment is a static programming error, not a dynamic failure condition, so aver instead of returning resparam. (see job003485).
...
Copied from Perforce
Change: 185426
ServerID: perforce.ravenbrook.com
2014-04-10 13:02:22 +01:00
Gareth Rees
1c25a89a70
Correct the nailboard level sizes; add assertion to nailboardindex checking this.
...
Copied from Perforce
Change: 185421
ServerID: perforce.ravenbrook.com
2014-04-10 12:24:49 +01:00
Gareth Rees
814595296d
Remove claim ".fence.size guarantees the template is larger" since this is no longer true. update debugging pool design to record the newly discovered portability requirement.
...
Copied from Perforce
Change: 185411
ServerID: perforce.ravenbrook.com
2014-04-09 19:00:50 +01:00
Gareth Rees
a5a1a9e03f
Avoid "cast discards const qualifier from pointer target type" from gcc.
...
Copied from Perforce
Change: 185406
ServerID: perforce.ravenbrook.com
2014-04-09 17:58:09 +01:00
Gareth Rees
d17ebed2cd
Delete mpsw3.h (and associated warning pragma): obsoleted by change from structured to vectored exception handling.
...
Copied from Perforce
Change: 185399
ServerID: perforce.ravenbrook.com
2014-04-09 17:31:06 +01:00
Gareth Rees
6207b83839
Sac stress test now tests with a variety of alignments, and tests the mfs class too.
...
Copied from Perforce
Change: 185390
ServerID: perforce.ravenbrook.com
2014-04-09 14:38:20 +01:00
Gareth Rees
d7d04e024c
Size class structures (mps_sac_class_s) are public, so should have names starting with "mps_" (these were removed incorrectly in change 179383).
...
Copied from Perforce
Change: 185389
ServerID: perforce.ravenbrook.com
2014-04-09 14:37:39 +01:00
Gareth Rees
ae8e213a3b
Mvff debug now supports alloc/free of large objects (by exposing and covering all segments which the object overlaps)
...
Copied from Perforce
Change: 185386
ServerID: perforce.ravenbrook.com
2014-04-09 13:30:36 +01:00
Gareth Rees
d36670e39d
Update the stress test cases (apss, mpmss, sacss) so that they test different alignments.
...
Copied from Perforce
Change: 185384
ServerID: perforce.ravenbrook.com
2014-04-09 13:13:09 +01:00
Gareth Rees
7089721738
Assertion about alignment in mvfree might catch some errors at an earlier and more comprehensible point in the code.
...
Copied from Perforce
Change: 185383
ServerID: perforce.ravenbrook.com
2014-04-09 13:04:28 +01:00
Gareth Rees
0bae62a7fe
Remove comment from mpscmv2.h -- it's obsolete (no such thing as mps_count_t) and anyway documentation is now in the manual.
...
Copied from Perforce
Change: 185382
ServerID: perforce.ravenbrook.com
2014-04-09 13:02:18 +01:00
Gareth Rees
07853f0c33
Alas, mvff and mvt can't round up alignment because they need to support buffered allocation.
...
Copied from Perforce
Change: 185381
ServerID: perforce.ravenbrook.com
2014-04-09 13:01:58 +01:00
Gareth Rees
e7a9e1e244
Make debugging pool implementation more flexible -- there's no longer a requirement for fencesize to be a multiple of the pool alignment, nor for freesize to be a divisor of the pool alignment. this makes it easy to write simple and portable debug options structures without having to mess about with mps_pf_align.
...
Copied from Perforce
Change: 185379
ServerID: perforce.ravenbrook.com
2014-04-09 13:00:52 +01:00
Gareth Rees
88626830d8
Alignment is now configurable for mv pools using mps_key_align.
...
MVFF and MVT support alignments down to FreelistMinimumAlignment.
For MVFF and MVT, alignments that are too small are rounded up automatically, to make it easier to write portable programs.
Copied from Perforce
Change: 185369
ServerID: perforce.ravenbrook.com
2014-04-08 21:32:19 +01:00
Gareth Rees
284482353a
The alignment of an awl pool is now set to the format alignment, as documented. the alignment restriction on pointers is now based on sizeof(void *), not mps_pf_align.
...
Copied from Perforce
Change: 185357
ServerID: perforce.ravenbrook.com
2014-04-08 18:29:25 +01:00
Gareth Rees
ffa190ac2b
Catch-up merge from master sources to branch/2014-03-25/ansi.
...
Copied from Perforce
Change: 185356
ServerID: perforce.ravenbrook.com
2014-04-08 18:07:11 +01:00
Gareth Rees
993821517e
Fix bugs in exposet0.c and steptest.c on windows.
...
Port djbench and gcbench to Windows.
Run amcssth and awlutth test cases on Windows.
Copied from Perforce
Change: 185354
ServerID: perforce.ravenbrook.com
2014-04-08 16:26:27 +01:00
Gareth Rees
a03056f39a
New header testthr.h provides simple threading interface.
...
Implementations testthrix.c for Unix and testthrw3.c for Windows.
Multi-threaded test cases use the new interface.
Rename lockutw3 to lockut (no longer Windows-specific).
Run multi-threaded test cases on Windows and lockut elsewhere.
Copied from Perforce
Change: 185350
ServerID: perforce.ravenbrook.com
2014-04-08 15:14:32 +01:00
Gareth Rees
c230d2ffaa
Remove unnecessary headers from the test suite.
...
Copied from Perforce
Change: 185340
ServerID: perforce.ravenbrook.com
2014-04-08 13:03:04 +01:00
Gareth Rees
51aac4e32d
No keyword arguments needed in these cbsfastlandclass initializations.
...
Copied from Perforce
Change: 185329
ServerID: perforce.ravenbrook.com
2014-04-08 00:13:50 +01:00