Slava Pestov
f4c0ffb143
Clean up some GC logic and fix a bug where large object allocation could grow the heap unnecessarily
2011-09-05 16:28:00 -07:00
Slava Pestov
705360e1de
vm: grow the heap if a full collection doesn't reclaim enough space
2009-12-05 19:03:53 -05:00
Slava Pestov
9ae5faa14e
vm: rewrite 'become' primitive so that it uses a slot visitor instead of GC
2009-11-05 19:03:51 -06:00
Slava Pestov
f2bf46e516
vm: fix issue with unnecessary heap growth
2009-11-03 22:25:22 -06:00
Slava Pestov
c7430d74c2
vm: remove promotion strategy, clean up compaction code
2009-11-01 03:47:09 -06:00
Slava Pestov
e2beabf2be
vm: new GC policy: mark sweep after N megabytes promoted, mark compact if tenured space cannot fit nursery+aging in one contiguous block. N = 32 on 32-bit and 64 on 64-bit
2009-10-30 02:26:57 -05:00
Slava Pestov
61c2ff4fff
vm: add primitives for getting at GC events, data-room and code-room primitives now return structs instead of arrays
2009-10-27 03:32:28 -05:00
Slava Pestov
2bae20cd41
vm: debugging mark-sweep
2009-10-21 19:41:54 -05:00
Slava Pestov
a03a817bdb
vm: mark sweep gc for tenured space work in progress
2009-10-20 22:20:49 -05:00
Slava Pestov
056ccc6741
vm: split off free_list_allocator from heap class, rename zone to bump_allocator
2009-10-20 15:26:11 -05:00
Slava Pestov
6ab380dc02
vm: object start recording in cards is now independent of allocation strategy
2009-10-20 13:47:04 -05:00
Slava Pestov
1f97169c62
vm: move factor_vm::untagged_object_size() to object::size()
2009-10-20 13:13:39 -05:00
Slava Pestov
5027527287
vm: during tenuring stage of aging collection, if tenured space fills up, it would attempt a to_tenured collection. this will succeed if all roots were tenured. however, this is unsound, because there's now an untraced segment of tenured space. fix: if tenuring fails, go on to do a full collection instead
2009-10-15 05:51:11 -05:00
Slava Pestov
1ee53d04a9
vm: new card marking implementation supports marking partial objects
2009-10-13 21:16:04 -05:00
Slava Pestov
c9e1d415fe
vm: refactoring card logic a bit
2009-10-09 11:16:18 -05:00
Slava Pestov
83de156992
vm: working on new object-oriented garbage collector
2009-10-07 15:48:09 -05:00
Slava Pestov
b9f386c693
vm: make a new old_space type to encapsulate a few things, split up generations array somewhat
2009-10-07 14:05:09 -05:00
Slava Pestov
bc691eb198
vm: replace generations array with individual instance variables referencing zone objects
2009-10-07 11:59:59 -05:00
Slava Pestov
8ffd538d27
vm: more code cleanups
2009-10-07 08:33:54 -05:00
Slava Pestov
39f4be940f
vm: faster zone::contains_p()
2009-10-06 06:47:56 -05:00
Slava Pestov
326952e919
vm: number of generations is not configurable anymore, split up begin_gc() and end_gc() into collect_{nursery,aging,aging_again,tenured}()
2009-10-06 02:39:12 -05:00
Slava Pestov
d5be02d48f
vm: refactoring garbage collector
2009-10-05 22:16:08 -05:00
Slava Pestov
3887292543
Big VM cleanup
...
- Move forward declarations of 'struct factor_vm' to one place
- Rename template parameters from T and TYPE to descriptive names. New convention: CamelCase for template parameters
- Change some higher-order functions taking function pointers into templates, and define classes overriding operator(). There's a bit of new boilerplate here but its more consistent than the old mish-mash approaches
- Put GC state into a gc_state struct
- Use exceptions instead of longjmp for non-local control transfer in GC
- In code GC, instead of interleaving code block tracing with copying, add code blocks which need to be revisited to an std::set stored in the gc_state
2009-10-03 08:47:05 -05:00
Phil Dawes
c2a5049a25
removed some superflous newlines
2009-10-01 07:33:16 +01:00
Phil Dawes
63266524d7
Moved PRIMITIVE and PRIMITIVE_FORWARDs to primitives.[ch]pp
2009-09-27 19:42:18 +01:00
Slava Pestov
3d196110b7
Make segment, context, data_heap, zone more object-oriented, and fix crash when calling undefined symbols
2009-09-25 21:17:20 -05:00
Phil Dawes
2cfb1b6f02
removed a bunch of superflous blank lines
2009-09-24 08:02:14 +01:00
Phil Dawes
fd72e140d2
nursery global variable moved into vm
2009-09-16 08:16:31 +01:00
Phil Dawes
e65a574a47
removed non-primitive global functions from data_heap
2009-09-16 08:16:26 +01:00
Phil Dawes
03ecc58bbf
Dev checkpoint
2009-09-16 08:16:25 +01:00
Phil Dawes
67a7e3ebf7
moved global state from data_heap into vm
2009-09-16 08:16:24 +01:00
Philipp Brüschweiler
18240b0219
misc small documentation fixes, some fixes for factor.vim, changed permissions of vm/* to 644
2009-08-10 21:33:07 +02:00
Slava Pestov
d2c138150b
Fix FEP if there are too many words in the image, clean up some VM code
2009-05-13 00:58:54 -05:00
Slava Pestov
92ae2f7e71
VM cleanup: replace some #defines with constants and inline functions
2009-05-08 15:05:55 -05:00
Slava Pestov
ec943c2299
Change (void) to ()
2009-05-05 11:33:35 -05:00
Slava Pestov
7c0a59f7a9
The great type renaming
2009-05-04 04:50:24 -05:00
Slava Pestov
7f48eb2b2c
Use C++ namespaces
2009-05-04 01:46:13 -05:00
Slava Pestov
1857f90eb6
VM: use better abstractions for tagged pointers, eliminate get()/set() stuff, clean up array, string, and byte-array element access
2009-05-04 01:00:30 -05:00
Slava Pestov
938d1a4270
Move vmpp to vm
2009-05-02 20:37:18 -05:00