rust-hosted-langs / book

Writing Interpreters in Rust: a Guide
https://rust-hosted-langs.github.io/book/
Creative Commons Attribution 4.0 International
479 stars 27 forks source link

Support for large objects #21

Open pliniker opened 4 years ago

pliniker commented 4 years ago

Currently, the allocator only allows objects up to 32k (the Immix block size) - large objects are not supported.

The code path in stickyimmix/heap.rs:114 that raises an error should implement some other mechanism for tracking large objects.

I haven't thought this through yet but my initial half-baked thought has been to keep a list (linked list? Vec?) of large objects, where memory for large objects might be backed by Vec<u8> and the object header stored in the initial word(s).