Gareth Rees
8a094c1bf7
Amc no longer keeps statistics about pages condemned and retained. if we need this kind of analysis, it would be better to add more telemetry until we can do the analysis offline.
...
Copied from Perforce
Change: 187274
ServerID: perforce.ravenbrook.com
2014-10-14 23:05:56 +01:00
Gareth Rees
1b010bdd9d
Add constant mps_rm_prot_inner and document it.
...
Copied from Perforce
Change: 187271
ServerID: perforce.ravenbrook.com
2014-10-14 22:59:32 +01:00
Gareth Rees
72a38afb68
Remove unused pool {fill,empty}{mutator,internal}size statistics.
...
Copied from Perforce
Change: 187270
ServerID: perforce.ravenbrook.com
2014-10-14 22:37:55 +01:00
Gareth Rees
d4b8907389
Assert if you try to create a pool using a format from another arena, a pool using a chain from another arena, or a root using a thread from another arena.
...
Copied from Perforce
Change: 187268
ServerID: perforce.ravenbrook.com
2014-10-14 22:21:43 +01:00
Gareth Rees
0c42e3aa23
Improved assertion messages when a required keyword argument is not found. instead of "unreachable code", the assertion message is the name of the missing key.
...
Copied from Perforce
Change: 187267
ServerID: perforce.ravenbrook.com
2014-10-14 22:05:30 +01:00
Gareth Rees
7db46bbb3f
Check alignment of address given to poolfree.
...
Copied from Perforce
Change: 187265
ServerID: perforce.ravenbrook.com
2014-10-14 16:54:10 +01:00
Gareth Rees
9fff9289af
Bring the discussion of avert up to date (it's not type-safe in the cool variety).
...
Copied from Perforce
Change: 187263
ServerID: perforce.ravenbrook.com
2014-10-14 10:59:58 +01:00
Gareth Rees
c5f2c467df
Oops, revert 187238.
...
Copied from Perforce
Change: 187257
ServerID: perforce.ravenbrook.com
2014-10-13 23:24:38 +01:00
Gareth Rees
c89ce2ba0b
Get the mmqa conerr tests working:
...
* Make sure all the test build and run.
* Add output specifications to the passing tests.
* New testset/conerr runs them all.
Copied from Perforce
Change: 187248
ServerID: perforce.ravenbrook.com
2014-10-13 21:34:12 +01:00
Gareth Rees
4a13898542
Move <stdlib.h> from testlib.c to testlib.h, for the benefit of test cases that need to use malloc.
...
Copied from Perforce
Change: 187247
ServerID: perforce.ravenbrook.com
2014-10-13 21:33:42 +01:00
Gareth Rees
6367f5c299
Get the mmqa argerr tests working:
...
* Make sure all the test build and run.
* Add output specifications to the passing tests.
* New testset/argerr runs them all.
Copied from Perforce
Change: 187245
ServerID: perforce.ravenbrook.com
2014-10-13 18:35:11 +01:00
Gareth Rees
47110d4316
Mmqa test harness improvements:
...
* Don't compile for profiling (not needed at the moment)
* Compile with -Wno-unused -Wno-missing-prototypes on OS X (so that argerr/146.c and similar test cases will build).
* Output conclusion for the first failing result (in alphabetical order), rather than whatever comes out of the hash table first.
* Don't gather symbols from block comments, otherwise we can't specify results like "assertcond = mps_pool_o != NULL" as MMQA will think that mps_pool_o is a missing symbol.
Copied from Perforce
Change: 187244
ServerID: perforce.ravenbrook.com
2014-10-13 18:33:37 +01:00
Gareth Rees
5afa5a492b
Use pointeradd to express the condition in mps_commit -- it expands to the same code, and better conveys the intention.
...
Copied from Perforce
Change: 187242
ServerID: perforce.ravenbrook.com
2014-10-13 17:36:44 +01:00
Gareth Rees
bef2871a1a
Check that unitsize and extendby are greater than zero. (zero is a likely argument to pass by accident if you get your varargs wrong.)
...
Copied from Perforce
Change: 187241
ServerID: perforce.ravenbrook.com
2014-10-13 17:35:57 +01:00
Gareth Rees
0ff9acf5ff
Check arena argument in ldadd, ldmerge and ldisstaleany.
...
Copied from Perforce
Change: 187240
ServerID: perforce.ravenbrook.com
2014-10-13 17:31:50 +01:00
Gareth Rees
4348937862
Don't use avert unless the arena lock is held (it's not thread-safe in all varieties). add design explaining this.
...
Copied from Perforce
Change: 187238
ServerID: perforce.ravenbrook.com
2014-10-13 14:36:15 +01:00
Gareth Rees
b672550acf
Add links to the lisp machine manual.
...
Copied from Perforce
Change: 187227
ServerID: perforce.ravenbrook.com
2014-10-12 23:40:13 +01:00
Gareth Rees
7b8e8aa4e1
No need to keep mps_ap_s in sync any more: the definition is shared (mpmst.h includes mpslib.h which includes mps.h).
...
Copied from Perforce
Change: 187221
ServerID: perforce.ravenbrook.com
2014-10-12 13:57:31 +01:00
Gareth Rees
8c3e1f4d6c
Link snc in the file-at-a-time builds, so that they match the mps.c builds.
...
Copied from Perforce
Change: 187208
ServerID: perforce.ravenbrook.com
2014-10-11 12:08:24 +01:00
Gareth Rees
42633ca624
Turn off the spare memory on the mvff pool so that it returns freed memory to the arena immediately.
...
Free the initial allocations so that the result determination is accurate.
Copied from Perforce
Change: 187206
ServerID: perforce.ravenbrook.com
2014-10-11 00:57:28 +01:00
Gareth Rees
34c8efce22
Specifying assertcond rather than assertline is likely to be more robust against code changes.
...
Copied from Perforce
Change: 187203
ServerID: perforce.ravenbrook.com
2014-10-10 22:55:48 +01:00
Gareth Rees
18a618cfe1
Need to take spare committed memory into account when checking that memory usage hasn't gone up after a collection.
...
Copied from Perforce
Change: 187202
ServerID: perforce.ravenbrook.com
2014-10-10 22:43:07 +01:00
Gareth Rees
f49ea829b9
In function/45.c, read from ambig[i] to prevent the compiler from optimizing away the array and so allowing p[i] to die.
...
In function/12.c, add a garbage collection to check that the allocation point protocol is being followed. Ensure there's an ambiguous reference to reserved objects before committin them.
Copied from Perforce
Change: 187200
ServerID: perforce.ravenbrook.com
2014-10-10 22:14:22 +01:00
Gareth Rees
90b8c2128f
Use .function for the tag here, because docutils doesn't turn .f into a link.
...
Copied from Perforce
Change: 187198
ServerID: perforce.ravenbrook.com
2014-10-10 19:37:35 +01:00
Gareth Rees
28ceede8dc
Job003495 is fixed, so mmqa test function/171.c now passes.
...
Reduce workload in function/171.c by a factor of 10 so that it completes in a reasonable amount of time.
Copied from Perforce
Change: 187194
ServerID: perforce.ravenbrook.com
2014-10-10 17:35:59 +01:00
Gareth Rees
92fceb127f
Job003739 is fixed, so mmqa test function/51.c passes.
...
Copied from Perforce
Change: 187192
ServerID: perforce.ravenbrook.com
2014-10-10 17:21:36 +01:00
Gareth Rees
8a529f4ba5
There's no such type as mps_count_t, so don't refer to it in the documentation!
...
Copied from Perforce
Change: 187191
ServerID: perforce.ravenbrook.com
2014-10-10 17:17:38 +01:00
Gareth Rees
faf6789c71
Cast arguments to the correct type to avoid them being decoded incorrectly by the varargs interface.
...
Copied from Perforce
Change: 187190
ServerID: perforce.ravenbrook.com
2014-10-10 17:14:09 +01:00
Gareth Rees
712b443baf
Make mmqa test suite compile and run on linux (specifically lii6ll).
...
Avoid compiler warnings about unused variables and bad casts.
Copied from Perforce
Change: 187188
ServerID: perforce.ravenbrook.com
2014-10-10 16:58:01 +01:00
Gareth Rees
f24a66c722
It's better to run from test directory -- otherwise testsets will have to be rewritten.
...
Copied from Perforce
Change: 187187
ServerID: perforce.ravenbrook.com
2014-10-10 16:56:34 +01:00
Gareth Rees
51209768de
Explain how to run the mmqa test suite on any unix.
...
Remove unused variables and avoid pointer->int conversions, so that the MMQA tests will run on platform lii6gc.
Copied from Perforce
Change: 187185
ServerID: perforce.ravenbrook.com
2014-10-10 15:32:30 +01:00
Gareth Rees
1276a299d3
Update the record of passing test cases.
...
Copied from Perforce
Change: 187183
ServerID: perforce.ravenbrook.com
2014-10-10 14:07:13 +01:00
Gareth Rees
dddab0caf3
Fix mmqa test function/136.c:
...
* Turn off the spare memory on the MVFF pool so that it returns freed memory to the arena immediately.
* Allocate something in the MV pool initially so that the span and block pools have some capacity.
* Stop the test if there isn't room in the MVFF to allocate 2 big blocks.
* Change the test success criterion so that it passes on 64-bit.
Copied from Perforce
Change: 187182
ServerID: perforce.ravenbrook.com
2014-10-10 14:04:41 +01:00
Gareth Rees
30eb2e9b27
It's now safe to allocate large objects in mvff pools.
...
Copied from Perforce
Change: 187180
ServerID: perforce.ravenbrook.com
2014-10-10 12:43:20 +01:00
Gareth Rees
8fb1e64614
Don't talk about "segments" in the pool documentation (this is a detail of the implementation, and may change).
...
The restriction that "buffered allocation can't allocate across segment boundaries" no longer affects MVFF as the pool no longer uses segments.
Copied from Perforce
Change: 187179
ServerID: perforce.ravenbrook.com
2014-10-10 12:42:29 +01:00
Gareth Rees
db01741686
Turn off the spare memory on the mvff pool so that it returns freed memory to the arena immediately.
...
Copied from Perforce
Change: 187177
ServerID: perforce.ravenbrook.com
2014-10-10 12:30:17 +01:00
Gareth Rees
5cf7a4aa4e
Turn off the hysteresis on the mvff pool so that we are testing the arena hysteresis only.
...
Copied from Perforce
Change: 187175
ServerID: perforce.ravenbrook.com
2014-10-10 12:08:12 +01:00
Gareth Rees
ae4328ad5a
Fix the definition of mps_key_spare_field so that you can set this keyword argument when creating an mvff pool. add test cases that use this feature.
...
Copied from Perforce
Change: 187174
ServerID: perforce.ravenbrook.com
2014-10-10 12:05:23 +01:00
Gareth Rees
6959f52a97
Remove call to deprecated macro mps_args_done.
...
Copied from Perforce
Change: 187171
ServerID: perforce.ravenbrook.com
2014-10-10 11:21:22 +01:00
Gareth Rees
5eaa1f50ef
Add note that the mps does not throw or catch exceptions, as suggested by rb < https://info.ravenbrook.com/mail/2014/10/09/15-07-32/0/ >. gloss "freestanding" and "hosted" to help explain why.
...
Copied from Perforce
Change: 187169
ServerID: perforce.ravenbrook.com
2014-10-10 10:52:44 +01:00
Gareth Rees
05ac242c57
If you try to create a client arena that's too small for the full complement of zones, return mps_res_memory instead of asserting.
...
If you try to create a virtual memory arena that's too small for the full complement of zones, round up the size to the minimum instead of asserting.
Copied from Perforce
Change: 187164
ServerID: perforce.ravenbrook.com
2014-10-08 22:16:56 +01:00
Gareth Rees
51a264446a
Amc now asserts that references (unless ambiguous) are aligned to the pool alignment.
...
Copied from Perforce
Change: 187162
ServerID: perforce.ravenbrook.com
2014-10-08 21:13:34 +01:00
Gareth Rees
00229b0479
Use the method suffix only for methods in classes; use visitor or function for other kinds of functions.
...
New document guide.impl.c.naming sets out the rules for naming.
Copied from Perforce
Change: 187159
ServerID: perforce.ravenbrook.com
2014-10-07 23:48:55 +01:00
Gareth Rees
f3cf67c792
New constant rankmin gives the minimum rank. use this (rather than 0 or rankambig) to better express the intention.
...
Copied from Perforce
Change: 187156
ServerID: perforce.ravenbrook.com
2014-10-07 22:31:12 +01:00
Gareth Rees
973518c36a
No need to detect "mps assertion failed" -- assertions are captured via mmqa_assert_handler.
...
Copied from Perforce
Change: 187153
ServerID: perforce.ravenbrook.com
2014-10-07 22:15:36 +01:00
Gareth Rees
2108c78cc0
Fix test cases: mps_arena_class_vmnz no longer exists, use mps_arena_class_vm instead.
...
Copied from Perforce
Change: 187152
ServerID: perforce.ravenbrook.com
2014-10-07 22:14:22 +01:00
Gareth Rees
88ca7174e7
Remove unused(boot) as boot is not unused.
...
No need for NOOP -- even without the UNUSED statement above it, an empty block would be legal in C.
Copied from Perforce
Change: 187147
ServerID: perforce.ravenbrook.com
2014-10-07 10:20:28 +01:00
Gareth Rees
3e5e2f2595
Rename "page" to "grain" in mvffreduce. use unused_size for an unused closure argument.
...
Copied from Perforce
Change: 187140
ServerID: perforce.ravenbrook.com
2014-10-04 16:09:27 +01:00
Gareth Rees
e6ce992ef2
Use one step period each run (not four) so that the test completes in a reasonable amount of time in the cool variety, but choose the step period randomly so as to get broader coverage.
...
Copied from Perforce
Change: 187130
ServerID: perforce.ravenbrook.com
2014-10-03 09:30:55 +01:00
Gareth Rees
efd677fe45
Document the assertion that you get if you destroy a pool containing objects registered for finalization, and then continue to run the garbage collector.
...
Copied from Perforce
Change: 187121
ServerID: perforce.ravenbrook.com
2014-10-02 13:05:26 +01:00