-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get the GC to work again and change the allocator
Allocator subsystem works with a single contiguous chunk of memory. Small object allocator uses fixed-size bins and never attempts to merge chunks, and the large object allocator is a slightly-modified version of the SQLite mem3.c allocator. The GC uses the boundaries of this chunk of memory, plus a table of flags, to determine if a Value refers to a heap allocation or not (we no longer have type information per-Value). The current implementation requires storing the size of each heap object in the GC header, but it should be possible to elide this requirement using flags (using 2 bits for each flag instead of 1, see golang GC implementation). Should support expanding the heap via. sbrk or similar (will require changing paw_Alloc to expand/contract the dynamic memory area, rather than implement a realloc-like interface).
- Loading branch information
1 parent
7d55931
commit 469fdd3
Showing
51 changed files
with
1,658 additions
and
1,184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.