Age | Commit message (Collapse) | Author |
|
To prevent the heap from growing infinitely large, we now do a full GC
every 10'000 allocations. :^)
|
|
This makes it a bit easier to work with LibJS on Linux for now.
|
|
When the Heap is going down, it's our last chance to run destructors,
so add a separate collector mode where we simply skip over the marking
phase and go directly to sweeping. This causes everything to get swept
and all live cells get destroyed.
This way, valgrind reports 0 leaks on exit. :^)
|
|
|
|
Well that was easy. LibJS can now run on Linux :^)
|
|
HeapBlocks now show up in SystemMonitor as "LibJS: HeapBlock(32)" :^)
|
|
This increases HeapBlock utilization significantly (and reduces overall
memory usage.)
|
|
We now deallocate GC blocks when they are found to have no live cells
inside them.
|
|
|
|
This is pretty heavy and unoptimized, but it will do the trick for now.
Basically, Heap now has a HashTable<HandleImpl*> and you can call
JS::make_handle(T*) to construct a Handle<T> that guarantees that the
pointee will always survive GC until the Handle<T> is destroyed.
|
|
This is very useful for discovering collector bugs.
|
|
We now scan the stack and CPU registers for potential pointers into the
GC heap, and include any valid Cell pointers in the set of roots.
This works pretty well but we'll also need to solve marking of things
passed to native functions, since those are currently in Vector<Value>
and the Vector storage is on the heap (not scanned.)
|
|
Let's try to keep LibJS tidy as it expands. :^)
|