Open stephenrkell opened 11 months ago
One possible overlap is the approach to classifying pointers at the top level. In MMTk there is a 4MB notion of "chunks" that is used to keep track of memory-mapping-granularity divisions of memory. In liballocs we use the pageindex, which has finer granularity (one page, as we'd expect) but a similar purpose... and behind the pageindex are big_allocation
s of course. Maybe we'll find that we can use one in place of the other (probably the pageindex in place of an chunk-associative structure, but that's not 100% clear yet).
A more extreme idea is this: can we implement the MMTk memory manager interface using liballocs? This would mean that any memory known to liballocs would be queryable or manipulable via MMTk's interface, i.e. backing onto liballocs's base- and meta-level APIs. Is this useful?
Like liballocs, MMTk encapsulates memory management with a mixture of base-level actions on memory (free) / objects (allocated), and somewhat-meta-level queries on objects (closed) / addresses or address ranges (open).
Flipping it around, we can also ask: given a Plan
(in MMTk-speak), or possibly a Builder
or MMTK
(not sure), can we generate a struct allocator
(in liballocs-speak)?
Now I understand a tiny bit more about MMTk, here are some thoughts.
mmtk_allocator
is not a silly idea. One per plan or per policy would be more sensible longer-term.VMBinding
somehow.VMBinding
so that type information can be passed out of the language implementation? Doesn't MMTk need something like this already for pointer maps?
For a long time I've wanted high-performance garbage-collected heaps to be available and integrated with liballocs -- especially as a foundation for multi-language interop. It is looking like MMTk could provide a great way to achieve this.
There is an open call for liballocs-related projects within MMTk here. This issue is the converse call to the liballocs audience (such as it is).
One initial set of goals is roughly this:
We can add more goals later, especially about what should perform well.
I'll add notes below about what I manage to get done, or just to understand, during early investigations of MMTk and liballocs.