starlight
starlight copied to clipboard
Improve the new GC
The new GC already performs very nicely but some improvements can be done:
- [ ] Lazy-sweeping
- [ ] Concurrent marking
- [x] Bitmap marking. Required for concurrent marking, this means we have to continuously have two bitmaps one for seeing what objects are allocated and the second one for mark bits, and each large allocation needs an additional
markfield. - [ ] WebKit's like Subspaces.
With subspaces, we can have collectible and uncollectible one. For example all JS strings might be allocated in
vm.heap.string_subspaceand regular objects invm.heap.object_subspace. There are a few problems though: should each subspace mmap a large chunk of memory for allocating blocks or there should be one large chunk of memory per runtime instance? - [ ] Internal pointers
- [ ] Write barriers
Bitmap marking is implemented but three-color abstraction is still there for incremental or concurrent marking.