1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

65 commits

Author SHA1 Message Date
Gareth Rees
4638be32ad Remove unused macros ("unless" and "when").
Copied from Perforce
 Change: 186120
 ServerID: perforce.ravenbrook.com
2014-05-15 17:35:27 +01:00
Gareth Rees
7620c6fcd1 Fix rash build on os x by adding the unused attribute to functions declared static that are not called in the rash variety.
Copied from Perforce
 Change: 185915
 ServerID: perforce.ravenbrook.com
2014-05-01 12:18:00 +01:00
Gareth Rees
c376a2b808 Mvt does not actually need to use gcsegs: in fact, gcsegs create difficulties because buffers need to be detached. so switch to using ordinary segs just like mvff.
Copied from Perforce
 Change: 185556
 ServerID: perforce.ravenbrook.com
2014-04-15 12:41:10 +01:00
Gareth Rees
9c8713f51b 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
d3d2795fce Improve control over checking:
1. Where Type is a pointer type with a signature, replace CHECKL(TypeCheck(val)) with CHECKD(Type, val).
2. Where Type is a pointer type with no signature, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val).
3. Where Type is a pointer type with a signature, but the structure is not visible at point of checking, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val). Reference <design/check/#.hidden-type>
4. Make BTCheck extern and use it where possible.
5. Replace AVER(TypeCheck(val)) with AVERT(Type, val).

Copied from Perforce
 Change: 185263
 ServerID: perforce.ravenbrook.com
2014-04-06 22:51:05 +01:00
Gareth Rees
673eea41a0 Check classes after defining them.
Copied from Perforce
 Change: 185228
 ServerID: perforce.ravenbrook.com
2014-04-04 12:51:07 +01:00
Gareth Rees
9aef4157fd Fix review comments from dl <https://info.ravenbrook.com/mail/2014/03/25/17-44-56/0/>.
Add __attribute__((__format__(printf))) to functions that take a printf-compatible format string (when building using GCC or Clang), so that format string mistakes can be detected statically.

Copied from Perforce
 Change: 185021
 ServerID: perforce.ravenbrook.com
2014-03-26 12:27:35 +00:00
Gareth Rees
9d5266c0cc Improved support for pelles c:
* Refactor nmake files so that a compiler-specific makefile is included; move Microsoft Visual C-specific options to mv.nmk.
* Add nmake files for Pelles (w3i3pc.nmk and pc.nmk).
* Rename spw3i3mv.c to spw3i3.c and spw3i6mv.c to spw3i6.c since these are also used by Pelles C.
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** check results of function calls;
** avoid useless return values;
** undef max before defining it;
** ensure printf formats are checkable;
** move notreached() assertions to the end of blocks;
** suppress warnings in cases where the code shouldn't be changed ("Unreachable code", "Inline assembly code is not portable", "Structured Exception Handling is not portable").

Copied from Perforce
 Change: 184977
 ServerID: perforce.ravenbrook.com
2014-03-24 18:23:29 +00:00
Richard Brooksby
887c6e3845 Tidying up interfaces to cbsinit and cbsfindinzones.
Documenting assumptions about CBS block allocation used by the arena.

Copied from Perforce
 Change: 184593
 ServerID: perforce.ravenbrook.com
2014-02-28 10:30:32 +00:00
Richard Brooksby
ddfec2c708 Eliminating complex zonedcbs adt and reintroducing a cbs with zone summaries. removing the default “high” segment preference, that caused the cbs trees to unbalance, and isn’t required outside of ep. considerable reduction in code and speed up, now at parity with master on test xc/release/gcbench -x 1234 amc
Copied from Perforce
 Change: 184587
 ServerID: perforce.ravenbrook.com
2014-02-28 00:35:05 +00:00
Richard Brooksby
f9051f09f6 Catch-up merge from master, mainly to pick up gcbench fixes.
Copied from Perforce
 Change: 184504
 ServerID: perforce.ravenbrook.com
2014-02-25 01:29:12 +00:00
Richard Brooksby
005a9d56da Detaching buffers from segments before freeing them in mvt.
Copied from Perforce
 Change: 184389
 ServerID: perforce.ravenbrook.com
2014-02-19 13:58:37 +00:00
Richard Brooksby
2151d00c7f Catch-up merge from master, mainly to pick up spare-ring merge.
Copied from Perforce
 Change: 184365
 ServerID: perforce.ravenbrook.com
2014-02-18 13:47:49 +00:00
Richard Brooksby
e6ff3a648f Merging branch //info.ravenbrook.com/project/mps/branch/2014-01-29/mps-chain-zones/... into master.
Copied from Perforce
 Change: 184342
 ServerID: perforce.ravenbrook.com
2014-02-14 15:15:07 +00:00
Richard Brooksby
252383465b Abolishing vmarenaalloc and its horrible relatives.
Removing redundant SegPref structures from pools that only ever used the default.
Abolishing the VMNZ arena class, to be replaced with an option to ArenaCreate.

Copied from Perforce
 Change: 184293
 ServerID: perforce.ravenbrook.com
2014-02-04 18:10:53 +00:00
Richard Brooksby
34f5aece3d Clarifying a comment.
Copied from Perforce
 Change: 184262
 ServerID: perforce.ravenbrook.com
2014-01-31 13:50:16 +00:00
Richard Brooksby
7a73e98638 Refactored implementation of preferenced allocation policy from vm arena to general purpose arena.
Eliminating SegPrefExpress in most places, especially where there wasn’t really any preference.
Eliminating special case knowledge about garbage collection from the arena.

Copied from Perforce
 Change: 184279
 ServerID: perforce.ravenbrook.com
2014-01-30 18:08:10 +00:00
Richard Brooksby
8e4e0f066e Eliminating dodgy use of *segprefdefault() which could lead to implicit calls to memcpy.
Copied from Perforce
 Change: 184217
 ServerID: perforce.ravenbrook.com
2014-01-29 15:13:22 +00:00
Gareth Rees
d917eb1d0c Merge branch/2013-05-17/emergency into the master sources.
This change refactors MVTBufferFill and makes related improvements to improve the clarity of the code.

Copied from Perforce
 Change: 183935
 ServerID: perforce.ravenbrook.com
2014-01-10 18:52:08 +00:00
Gareth Rees
b14f5a51d7 Make improvements (mostly to comments) based on reviews:
https://info.ravenbrook.com/mail/2014/01/10/15-57-50/0/
https://info.ravenbrook.com/mail/2014/01/10/15-40-47/0/

Copied from Perforce
 Change: 183932
 ServerID: perforce.ravenbrook.com
2014-01-10 18:18:06 +00:00
Gareth Rees
b87ce7680f Don't call mvtsegfree from mvtfinish: we don't know whether or not there was any fragmented (unavailable) space in this segment, and so we can't keep the accounting correct. add assertion in mvtsegfree that detects incorrect accounting.
Copied from Perforce
 Change: 183610
 ServerID: perforce.ravenbrook.com
2013-10-30 13:15:09 +00:00
Richard Brooksby
01394a89ae Rewriting mvtbufferfill to separate out its various attempts to allocate memory and clarify their relationships. mvtbufferfill itself now clearly spells out the methods it applies and its fallbacks. this reveals quite a few questions which i have noted with fixmes and todos.
Copied from Perforce
 Change: 182642
 ServerID: perforce.ravenbrook.com
2013-06-08 18:38:03 +01:00
Gareth Rees
1d594d8c6d 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
da3afade7b 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
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
3cd8c3964f 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
d6912235bd 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
2bda69bc6b 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
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
87019f4ee2 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
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
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
515241d9e0 Improve description of mvtdeleteoverlapping.
Copied from Perforce
 Change: 182038
 ServerID: perforce.ravenbrook.com
2013-05-21 15:51:51 +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
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
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
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
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
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
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
af44d1241f Replacing varargs passed to seginit with keyword argument list.
Copied from Perforce
 Change: 181679
 ServerID: perforce.ravenbrook.com
2013-05-09 17:34:01 +01:00
Richard Brooksby
f4416c7efc Changing required keyword arguments to cause an assertion rather than return a status code, and removing repetition in how this is expressed.
Copied from Perforce
 Change: 181674
 ServerID: perforce.ravenbrook.com
2013-05-09 15:15:40 +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
03c7de38b6 Macroizing keyword definitions and adding more keyword argument checking methods.
Copied from Perforce
 Change: 181647
 ServerID: perforce.ravenbrook.com
2013-05-08 23:40:40 +01:00
Richard Brooksby
71b7e4f70a Pushing varargs decoding into a pool class method. much simpler.
Copied from Perforce
 Change: 181642
 ServerID: perforce.ravenbrook.com
2013-05-08 22:43:51 +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
Gareth Rees
fcd7180d08 Rename "mpscmv2.h" to "mpscmvt.h" for consistency.
Copied from Perforce
 Change: 180489
 ServerID: perforce.ravenbrook.com
2012-11-16 14:48:14 +00:00