Gareth Rees
c94be13bdf
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
83ed2f72bf
Reponding to code review < https://info.ravenbrook.com/mail/2014/03/10/17-01-58/0/ >.
...
Renaming the arena’s “zoned CBS” back to earlier “free CBS”, especially since it might not be zoned.
Copied from Perforce
Change: 184738
ServerID: perforce.ravenbrook.com
2014-03-11 17:27:57 +00:00
Richard Brooksby
2a7fd3c326
Incomplete response to code review. see < https://info.ravenbrook.com/mail/2014/03/07/11-21-03/0/ >.
...
Copied from Perforce
Change: 184735
ServerID: perforce.ravenbrook.com
2014-03-11 16:39:11 +00:00
Richard Brooksby
098eb9e6d7
Catch-up merge from master.
...
Copied from Perforce
Change: 184732
ServerID: perforce.ravenbrook.com
2014-03-11 16:30:47 +00:00
Richard Brooksby
e4451dcf3b
Restoring error path for arenaalloc.
...
Copied from Perforce
Change: 184604
ServerID: perforce.ravenbrook.com
2014-02-28 13:48:56 +00:00
Richard Brooksby
9eb1d4a298
Adding unzoned arena tests back, now that there is a method of asking for them.
...
Copied from Perforce
Change: 184602
ServerID: perforce.ravenbrook.com
2014-02-28 13:46:36 +00:00
Richard Brooksby
b338f41c47
More closely duplicating the allocation policy from the old vmarena, and documenting why.
...
Copied from Perforce
Change: 184601
ServerID: perforce.ravenbrook.com
2014-02-28 13:35:51 +00:00
Richard Brooksby
eb75944742
Adding a keyword to the arena to disable zoned allocation.
...
Copied from Perforce
Change: 184599
ServerID: perforce.ravenbrook.com
2014-02-28 13:20:06 +00:00
Richard Brooksby
cd19bda000
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
0c16e904f5
Simplifying the interface to cbsfindinzones.
...
Speeding up CBSFindInZones a bit.
Copied from Perforce
Change: 184589
ServerID: perforce.ravenbrook.com
2014-02-28 01:25:18 +00:00
Richard Brooksby
fc720aff46
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
9f380dba48
Adding some missing headers revealed by separate compilation.
...
Copied from Perforce
Change: 184584
ServerID: perforce.ravenbrook.com
2014-02-27 18:01:05 +00:00
Richard Brooksby
3d9635bafb
Adding check for unexpected case of zone barging.
...
Copied from Perforce
Change: 184583
ServerID: perforce.ravenbrook.com
2014-02-27 17:50:44 +00:00
Richard Brooksby
322b4ba6dd
Simplifying interface to high and low allocation in the zoned cbs.
...
Copied from Perforce
Change: 184576
ServerID: perforce.ravenbrook.com
2014-02-27 12:01:42 +00:00
Richard Brooksby
9223d3de81
Separating arena cbs allocator into abstract zonedcbs adt. the number of chunks seems to blow up.
...
Copied from Perforce
Change: 184575
ServerID: perforce.ravenbrook.com
2014-02-27 04:50:52 +00:00
Richard Brooksby
9dff6e6d1d
Searching the freecbs now respects the “high” preference, though not yet within blocks.
...
Copied from Perforce
Change: 184574
ServerID: perforce.ravenbrook.com
2014-02-26 19:29:05 +00:00
Richard Brooksby
e7efed948e
Implemented “high” preference allocation for zone stripes.
...
Copied from Perforce
Change: 184573
ServerID: perforce.ravenbrook.com
2014-02-26 18:18:20 +00:00
Richard Brooksby
a06ba218b6
Fixing cbsfindfirstinzones to return a res, because it can fail when it can’t allocate a cbs block, unlike cbsfindfirst.
...
Fixing related corner case in arenaAllocFindInFreeCBS when it thought it couldn’t find a block when it was in fact running out of nodes. This was revealed by “gcbench --npass 1 --arena-size 1M --seed 945632066 --niter 1 amc”.
Fixing draft ArenaFreeCBSDelete after exercising it.
Copied from Perforce
Change: 184568
ServerID: perforce.ravenbrook.com
2014-02-26 17:40:39 +00:00
Richard Brooksby
e991295b8d
Adding checking of the freecbs and zonecbss to arenacheck.
...
Copied from Perforce
Change: 184563
ServerID: perforce.ravenbrook.com
2014-02-26 14:25:01 +00:00
Gareth Rees
32d10cd02a
Make mps_args_done obsolete.
...
Copied from Perforce
Change: 184543
ServerID: perforce.ravenbrook.com
2014-02-26 12:47:27 +00:00
Richard Brooksby
67b596b72b
Implementing arenafreecbsdelete that might work on chunks that have interesting patterns of zone allocation.
...
Further tidying up.
Copied from Perforce
Change: 184531
ServerID: perforce.ravenbrook.com
2014-02-25 19:19:09 +00:00
Richard Brooksby
4295c4b9cc
Tidying up and wrapping arena cbs operations.
...
Copied from Perforce
Change: 184530
ServerID: perforce.ravenbrook.com
2014-02-25 16:58:23 +00:00
Richard Brooksby
51578a6bad
Removing the freering allocation cache, which breaks the cbs abstraction and does not give any benefit once we’re allocating from zonecbss.
...
Copied from Perforce
Change: 184529
ServerID: perforce.ravenbrook.com
2014-02-25 11:35:18 +00:00
Richard Brooksby
7f213d846c
Tidying up arena cbs mfs teardown.
...
Tidying up arena CBS initialisation and teardown.
Copied from Perforce
Change: 184523
ServerID: perforce.ravenbrook.com
2014-02-25 11:16:12 +00:00
Richard Brooksby
c52f568137
Quick hack at allocating from per-zone cbs. promising performance.
...
Copied from Perforce
Change: 184507
ServerID: perforce.ravenbrook.com
2014-02-25 01:51:27 +00:00
Richard Brooksby
a298b3874b
Attempting to combine fast page allocation with cbs allocation. currently not working properly, as the cbs and free page rings overlap.
...
Copied from Perforce
Change: 184471
ServerID: perforce.ravenbrook.com
2014-02-19 11:04:18 +00:00
Richard Brooksby
b12e1b8224
Adding per-zone arena cbss, but they aren’t filled with any free space yet.
...
Copied from Perforce
Change: 184470
ServerID: perforce.ravenbrook.com
2014-02-18 13:53:56 +00:00
Richard Brooksby
46e7234676
Added a pool argument to cbs creation so that cbss can share a pool. in particular, per-zone allocation cbss for the arena can share a single special block pool.
...
Copied from Perforce
Change: 184469
ServerID: perforce.ravenbrook.com
2014-02-18 13:53:56 +00:00
Richard Brooksby
4dff43a172
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
36746fbaab
Generic chunkinit and chunkdestroy now maintain their memory in the freecbs so that the client arena should also work.
...
ArenaDestroy fixed so that ChunkDestroy can go ahead even though the freeCBS has been torn down. Allows completion of test programs.
Copied from Perforce
Change: 184295
ServerID: perforce.ravenbrook.com
2014-02-04 18:50:56 +00:00
Richard Brooksby
142063f059
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
d34bfbabc9
Deleting a chunk’s address range from the arena’s freecbs when the chunk is destroyed. otherwise, the memory gets allocated and an assertion fires when that memory is not in any chunk.
...
Copied from Perforce
Change: 184281
ServerID: perforce.ravenbrook.com
2014-02-01 00:34:52 +00:00
Richard Brooksby
35ccb414a2
Adding arena extension back to the arena allocation policy.
...
Copied from Perforce
Change: 184280
ServerID: perforce.ravenbrook.com
2014-01-31 22:47:29 +00:00
Richard Brooksby
d206bd35b9
Changes from review comments made in < https://info.ravenbrook.com/mail/2014/01/31/13-40-25/0/ >.
...
ArenaSpareCommitExceeded changed to ArenaPurgeSpare so that the arena can properly reduce the amount of spare memory when setting the commit limit etc.
pagesMarkAllocated promptly unmaps page table pages in its error path.
Miscellaneous clarifications and extra checking.
Copied from Perforce
Change: 184267
ServerID: perforce.ravenbrook.com
2014-01-31 15:21:21 +00:00
Richard Brooksby
ecc0ab3dfe
Abolishing the spare pages bit table.
...
Not quite working yet. This code fails to unmap unused page table pages, and so triggers an assertion at chunk finish.
Copied from Perforce
Change: 184246
ServerID: perforce.ravenbrook.com
2014-01-30 19:58:36 +00:00
Richard Brooksby
070f7784dd
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
15667c6135
Incorporating early commit limit checking into arena allocation policy.
...
Copied from Perforce
Change: 184240
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
bdc4557496
Abstracting the allocation policy from arenaalloc in order to implement arena extension policy.
...
Copied from Perforce
Change: 184239
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
efc7ad3d08
Tidying up the bootstrap so that every chunk gets added to the arena’s freecbs.
...
Copied from Perforce
Change: 184238
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
7e310bb39f
Generalising allocation of initial page for the arena’s freecbs so that it can be used when new chunks are added.
...
Copied from Perforce
Change: 184237
ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
6d696d79be
Hacky clean-up of the cbs' mfs tracts so that the arena can shut down successfully.
...
Copied from Perforce
Change: 184072
ServerID: perforce.ravenbrook.com
2014-01-21 16:10:16 +00:00
Richard Brooksby
23d1a5423c
First draft of freeing into the arena's freecbs.
...
Copied from Perforce
Change: 184052
ServerID: perforce.ravenbrook.com
2014-01-18 18:24:07 +00:00
Richard Brooksby
3c52c769a1
Making the reservoir use arenaalloc and arenafree like a good citizen, rather than bypassing them, so that it correctly gets memory from the freecbs.
...
Copied from Perforce
Change: 184051
ServerID: perforce.ravenbrook.com
2014-01-18 17:45:56 +00:00
Richard Brooksby
cf8738fd9f
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
7b54fc9926
Creating and tearing down the arena freecbs that will hold free address ranges.
...
Copied from Perforce
Change: 184049
ServerID: perforce.ravenbrook.com
2014-01-18 16:25:08 +00:00
Richard Brooksby
ad0d2c99df
Adding a free address space cbs to the arena, initialising and finishing it, but not using it yet.
...
Moved CBSStruct to mpmst.h so that it can be included inline in ArenaStruct without circularity problems.
Copied from Perforce
Change: 184044
ServerID: perforce.ravenbrook.com
2014-01-17 16:15:13 +00:00
Gareth Rees
bcfad58d3c
Merge custom cet mainline into the master sources. this includes fixes for job003519 (clock values in text telemetry logs on windows have top 32 bits zero), job003536 (cet office can't replicate 100k snowmen in reasonable time), job003651 (stack overflows are not reliably handled).
...
Copied from Perforce
Change: 183926
ServerID: perforce.ravenbrook.com
2014-01-10 14:16:08 +00:00
Richard Brooksby
03a84ad1c5
Ensuring that the arena passes consistency checking before calling vmarenatrivextended, by setting the zoneshift and alignment at the same time.
...
Copied from Perforce
Change: 182708
ServerID: perforce.ravenbrook.com
2013-06-12 20:02:29 +01:00
Richard Brooksby
60f7df4335
Adjusting the default extend_by of the mv pool to be more sensible and match the other pools, but overriding it in the case of the arena control pool, where the default originated.
...
Copied from Perforce
Change: 181946
ServerID: perforce.ravenbrook.com
2013-05-19 20:01:52 +01:00
Richard Brooksby
6d81499f35
Replacing duplicate *trivvarargs methods with a single implementation in args.c.
...
Copied from Perforce
Change: 181851
ServerID: perforce.ravenbrook.com
2013-05-16 13:10:01 +01:00