kyren / gc-arena

Incremental garbage collection from safe Rust
Creative Commons Zero v1.0 Universal
436 stars 36 forks source link

Tracked external allocations #76

Closed kyren closed 11 months ago

kyren commented 11 months ago

Extremely simplistic design, tracks external allocations as a bytecount, increasing the total external allocations speeds up collection, decreasing it slows down collection, both occur the same as if memory was allocated in the "normal" fashion.

External memory owned per gcbox is not tracked, instead, for the purposes of pacing calls to trace, each gcbox is assumed to own an equal fraction of the total external bytecount.

kyren commented 11 months ago

Addressed a bunch of stuff over discord, the math is very difficult to review but it at least APPEARS not to be broken. This is going to live in master for a while while we build tooling to do better testing and gather more data and stop working on this kind of thing so blind.