Commit Graph

95 Commits (cbdd559a759b5aef9b1c97d8b69a29e159d14ae1)

Author SHA1 Message Date
Björn Lindqvist 3911f7b88c VM: init_data_heap() isn't needed 2016-10-14 13:52:44 +02:00
Björn Lindqvist c2f4fdb172 VM: merge of the free_list and free_list_allocator classes
Seem simpler to have all the free list stuff in one class rather than
split it over two classes.
2016-10-08 07:04:28 +02:00
Alexander Iljin 0d57734dab vm: replace block comments /**/ with line comments // 2016-09-09 05:47:52 +02:00
Alexander Iljin e0acf4f328 Revert "vm: replace line comments // with block comments /**/ for consintency"
This reverts commit 7ee4e5dea5.
2016-09-09 05:47:52 +02:00
Alexander Iljin 7ee4e5dea5 vm: replace line comments // with block comments /**/ for consintency
Fix #1651.
2016-08-03 09:19:48 -07:00
Björn Lindqvist da4812ba21 VM: refactoring which removes two not useful short methods 2016-04-04 23:32:23 +02:00
Björn Lindqvist 4dfac78fc1 VM: move changes of structs to lambda functions 2015-07-06 22:49:38 +02:00
Björn Lindqvist 3887b58c02 VM: cleanups, like removing redundant paranthesis and removing method
declarations that doesn't exist
2015-05-09 20:04:22 -07:00
Björn Lindqvist 0798928996 VM: cleanup of some infrequently used functions that can be replaced with direct code
also replacing some bitshifts with easier to understand multiplies and
divides, they are equally fast nowadays
2015-02-28 14:14:30 -08:00
Björn Lindqvist d2aea0f606 VM: replaced the reset_generation() generic method with one method for each generation 2015-01-15 09:29:14 +00:00
Björn Lindqvist 885b5c7043 VM: no need for a nursery_space class, it's just a bump_allocator 2014-12-04 10:23:33 -08:00
Björn Lindqvist 50c74fc496 VM: get rid of the duplicated nursery instance in vm->data->nursery
vm.nursery and vm->data->nursery are different objects. They get out
of sync when Factor code bumps vm.nursery but leaves vm->data->nursery
unchanged. The emptiness of vm->data->nursery meant that each_object()
never iterated it.
2014-11-21 02:16:03 -08:00
Björn Lindqvist 2a5e1e06f3 VM: each_object() can't iterate the nursery so instead we assume it's empty 2014-11-21 02:16:03 -08:00
Björn Lindqvist 4e63ba8dc8 VM: debug code which memsets the resetted space 2014-11-10 23:23:43 -08:00
Erik Charlebois ffe41b3d7f VM: Fixup cast formatting after clang-format
clang-format doesn't recognize casts to non-pointer/non-template types
so it winds up adding a space between the right paren and the expression
and then failing to recognize prefix operators in the process
(e.g. foo = (cell) & bar; should be foo = (cell)&bar;). This commit
manually fixes up the major cases (fixnum, cell, all types ending in _t).
2013-05-13 14:59:24 -04:00
Erik Charlebois 7b1b1eef23 VM: Remove unnecessary _ suffix in constructors 2013-05-12 23:20:43 -04:00
Erik Charlebois 75e6c88534 VM: Refactor data_heap* to Factor style 2013-05-12 13:24:43 -04:00
Erik Charlebois ca2ea548be VM: Remove exec bit from VM source files 2013-05-11 17:04:23 -04:00
Doug Coleman 2b33dde782 vm: Add more Allocates memory comments. 2013-03-25 17:52:30 -07:00
Doug Coleman 86649ce1c0 vm: More allocates comments. 2013-03-25 14:05:05 -07:00
Joe Groff 0a1a252cdb vm: replace assert with FACTOR_ASSERT
Factor is finally a real C++ project and has a custom assert macro. Assertion failures were still getting caught as exceptions and causing failure loops. Write our own macro that calls factor::abort on failure.
2011-11-23 11:11:26 -08:00
Joe Groff dca0fd3487 vm: Revert extra canary page before callstack
This reverts commit 7d5c8d6990385b94569116a23163d7e75ae21f49. We pretty much can't avoid unwinding frames without some more drastic redesign.
2011-10-27 21:14:50 -07:00
Joe Groff c3f007ce0a vm: allocate an extra canary page before callstack
This will let us safely unguard the callstack overflow guard page as a grace page so the callstack overflow handler can do its business without discarding frames.
2011-10-27 21:14:49 -07:00
Slava Pestov 83b8717bad 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 806e54630a GC maps for more compact inline GC checks 2010-06-11 20:06:00 -04:00
Slava Pestov 560c119cd2 vm: actually use context callstacks when running code 2010-03-26 22:44:43 -04:00
Doug Coleman d22eb40360 Fix spaces that crept into vm/ cpp files 2010-02-06 01:06:26 -06:00
Slava Pestov 26cae00eeb Add code heap introspection primitive to VM, and make a code-blocks word in tools.memory that wraps a useful interface around this. Add a lookup-return-address word and use this in tools.disassembler.utils 2010-02-03 23:11:32 +13:00
Slava Pestov 63edd20a55 vm: eliminating register variables work in progress. Works on x86-32 with non-optimizing compiler 2009-12-19 10:59:56 +13:00
Slava Pestov 0068bce934 vm: big overhaul of non-optimizing compiler
- change some primitives into sub-primitives: fixnum+ fixnum- fixnum* inline-cache-miss inline-cache-miss-tail
- rename some relocation types for clarity
- some other minor re-organizations and cleanups
2009-12-15 07:20:09 -05:00
Slava Pestov 344c357ef1 vm: grow the heap if a full collection doesn't reclaim enough space 2009-12-05 19:03:53 -05:00
Slava Pestov ead592697b vm: be more eager to do a full collection to avoid fragmentation leading to heap growth 2009-12-04 03:41:19 -05:00
Slava Pestov 001a3f2847 vm: mark sweep now traces code block references; rename embedded_pointer to instruction_operand 2009-11-23 19:17:12 -06:00
Slava Pestov cf35ffb126 vm: fix problem in card marking if first block is free 2009-11-16 00:52:32 -06:00
Slava Pestov 064c00f78d New identity-hashcode primitive 2009-11-10 21:18:54 -06:00
Slava Pestov 11075828e5 vm: faster data_root and <array> primitive 2009-11-06 05:30:37 -06:00
Slava Pestov eac0f9ffcf vm: report true size of mark stack 2009-11-06 04:15:55 -06:00
Slava Pestov c512013220 vm: fix crash if all-instances primitive triggers a GC 2009-11-06 01:41:11 -06:00
Slava Pestov e2107166ff vm: restructure data_roots so that its a sequence of handle/len pairs rather than just handles, use it in inline_gc() and all_instances() so that we don't run out of heap while building the object array 2009-11-06 00:54:28 -06:00
Slava Pestov 4061951d1c vm: simpler object space implementation. begin-scan/next-object/end-scan primitives replaced by a single all-instances primitive 2009-11-05 21:49:03 -06:00
Slava Pestov 72ab6ec548 vm: rewrite 'become' primitive so that it uses a slot visitor instead of GC 2009-11-05 19:03:51 -06:00
Slava Pestov e1c365e69a vm: fix issue with unnecessary heap growth 2009-11-03 22:25:22 -06:00
Slava Pestov 5ae40e26ee vm: remove promotion strategy, clean up compaction code 2009-11-01 03:47:09 -06:00
Slava Pestov 7cbaf3e0a3 vm: don't do a data compaction when growing the data heap, speeds up data heap grow by a bit 2009-10-31 21:06:34 -05:00
Slava Pestov 5536003cf8 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 a1aac42786 vm: clean up gc events, remove -verbosegc switch, fix compaction bug 2009-10-27 21:31:28 -05:00
Slava Pestov d95a98eb9c 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 e793a72060 vm: remove crummy old GC stats, split off free list code, clean up various other things 2009-10-26 22:08:35 -05:00
Slava Pestov cf247c23a2 vm: room. now prints mark stack size, and total/contiguous free space 2009-10-25 13:18:06 -05:00
Slava Pestov 0b65b194c9 vm: fix 'data-room' primitive to report correct sizes for tenured space 2009-10-24 23:49:33 -05:00