Commit graph

345 commits

Author SHA1 Message Date
Justin Ethier
b637d13783 Merge or the worthwhile changes from gc-opt3-dev 2017-01-24 21:52:12 -05:00
Justin Ethier
33e55c3cce GC tweaks to avoid free/grow thrashing
Attempt to prevent thrashing the GC during earley benchmark by:

- Allowing a larger max page size
- Only freeing huge pages. This prevents thrashing where pages are freed only to be immediately reallocated when the heap is grown after sweep.

Longer term it may be necessary to allow freeing of pages by being more intelligent about things.
2017-01-12 14:37:48 +00:00
Justin Ethier
35b184e97d Added comment 2017-01-11 19:00:05 -05:00
Justin Ethier
649e0eb5c8 Inline gc_mark_globals
Force inlining to attempt to improve performance
2017-01-11 17:54:49 -05:00
Justin Ethier
5823b37b5d WIP 2017-01-11 18:45:28 +00:00
Justin Ethier
e6a145eeac Potential speedup?
Attempt to speed up gc_collector_mark_gray by forcing it to be inlined via a C macro. I am skeptical the compiler cannot do this already but the change seems to speed the earley benchmark up by several seconds.
2017-01-11 18:03:13 +00:00
Justin Ethier
2bee1575c0 Issue #118 - Added current-thread 2016-11-21 16:54:34 -05:00
Justin Ethier
97fa0c2dbd WIP 2016-11-19 05:35:25 +00:00
Justin Ethier
5810b7c035 Fix crash on 32-bit systems 2016-11-22 02:58:01 -05:00
Justin Ethier
063e5c8c73 Added comment, switch to >= 2016-11-11 02:07:30 +00:00
Justin Ethier
391051ba7b GC performance improvements
- Increase page size
- Cache last page that had an allocation, and start from that page next time, if possible. This speeds up allocation on large heaps because we can avoid searching through the whole heap each time.
2016-11-13 16:54:57 -05:00
Justin Ethier
4aec9a341f Added mem-streams module 2016-08-25 23:38:34 -04:00
Justin Ethier
4b7707e898 Cleanup 2016-08-11 17:57:40 -04:00
Justin Ethier
560667eef6 Only use 96-byte object heap on 64-bit platforms 2016-08-03 03:23:16 -04:00
Justin Ethier
4049304095 Added TODO 2016-08-03 00:11:48 -04:00
Justin Ethier
918e78cb21 Added another size heap (96 bytes) 2016-08-01 18:48:58 -04:00
Justin Ethier
ffb5b36869 WIP 2016-08-02 03:34:26 -04:00
Justin Ethier
352203bd32 Added additional debugging 2016-08-02 01:34:32 -04:00
Justin Ethier
dc8f4c02a1 Additional debug information 2016-08-01 21:06:35 -04:00
Justin Ethier
bd74d90100 Replace GC_DEBUG_PRINTFS with GC_DEBUG_TRACE 2016-07-30 19:13:23 -04:00
Justin Ethier
09807899d0 Fixes to debug code 2016-07-30 18:24:07 -04:00
Justin Ethier
facaf608ae Define gc_collector_mark_gray as static
This is a commonly used function that the C compiler may be able to better optimize, such as inline, now that it is guaranteed to only be used within the gc.c module.
2016-07-25 21:46:30 -04:00
Justin Ethier
d6f5a81f2d Fixed compiler warnings 2016-07-19 23:02:21 -04:00
Justin Ethier
1c0c0bb315 Change how mutations are stored in memory
Use a reallocated memory buffer instead of malloc'd pairs. This should speed things up by reducing the number of allocations and by keeping mutations in contiguous sections of memory.
2016-07-15 23:14:36 -04:00
Justin Ethier
d1b117f609 ifdef the "free" debug msg 2016-07-06 22:27:58 -04:00
Justin Ethier
8a3ed8e1a0 Free empty heap pages 2016-07-06 22:21:31 -04:00
Justin Ethier
d362f15ede Bug fixes for huge heap objects 2016-07-07 03:28:17 -04:00
Justin Ethier
fe27aff148 Properly find last page of huge heap 2016-07-07 03:09:36 -04:00
Justin Ethier
aac1c44b3d Attempt to allocate huge vectors on the heap 2016-07-06 23:38:57 -04:00
Justin Ethier
f526eeb6f3 Populate huge object heap 2016-07-06 23:07:43 -04:00
Justin Ethier
54f217fd4b Added gc_heap_type and HEAP_HUGE 2016-07-06 20:30:23 -04:00
Justin Ethier
558c7d8257 Fast-track heap page size for a large allocation 2016-07-05 21:53:38 -04:00
Justin Ethier
93eff719a7 Cleanup 2016-06-29 08:06:38 -04:00
Justin Ethier
5a7be4f864 WIP 2016-06-27 23:01:41 -04:00
Justin Ethier
ed77858901 Added TODO 2016-06-28 00:46:26 -04:00
Justin Ethier
040ce4f017 WIP 2016-06-28 00:32:17 -04:00
Justin Ethier
a2dccabdb7 Initial version of gc_heap_free() 2016-06-27 20:45:23 -04:00
Justin Ethier
aa93c2c487 Issue #73 2016-06-25 00:21:20 -04:00
Justin Ethier
7181268d6b Ran 'make indent' 2016-04-27 03:49:41 -04:00
Justin Ethier
5d1a605b66 Refactoring 2016-04-27 02:24:05 -04:00
Justin Ethier
008c857755 Refactoring 2016-04-26 23:33:36 -04:00
Justin Ethier
df20aaa6d3 Refactoring 2016-04-20 23:42:21 -04:00
Justin Ethier
ef1db96f2a Refactoring 2016-04-20 23:10:46 -04:00
Justin Ethier
9bcdd35370 Added more GC constants 2016-04-20 22:07:14 -04:00
Justin Ethier
40416364f8 Refactoring 2016-04-20 23:00:04 -04:00
Justin Ethier
63a2204efc Refactoring 2016-04-20 22:20:02 -04:00
Justin Ethier
b14d25afc9 Decrease memory usage of object header 2016-04-20 21:46:28 -04:00
Justin Ethier
7815cebd5a GC for opaques 2016-04-19 22:11:31 -04:00
Justin Ethier
6d9b1436ec Tweak initial heap size 2016-04-13 21:21:48 -04:00
Justin Ethier
b0b02c0dc7 Move fprintf to GC trace 2016-04-12 22:37:06 -04:00