Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple heaps #46

Open
EvanKirshenbaum opened this issue Sep 28, 2017 · 0 comments
Open

Support multiple heaps #46

EvanKirshenbaum opened this issue Sep 28, 2017 · 0 comments

Comments

@EvanKirshenbaum
Copy link
Collaborator

[imported from HPE issue 267]

Our current code assumes that all gc_ptrs and offset_ptrs point into the same heap (i.e., they have the same base that needs to be added to get to a bare pointer and for GC heaps, they are all collected together). Long term, people will want to have multiple heaps, and they will probably want some of them to be garbage collected and some not. And different programs will want to refer to different sets of heaps. And some heaps will be read-only and some won't.

One possibility is to generalize gc_ptr<T> to gc_ptr<N,T>, where N is a number the program uses to identify a particular heap. (N need not be the same between programs.) This can trivially enforce that there are no pointers between heaps, which will simplify GC, but we may want it to be possible to identify offset_ptr<N,T> as pointing into a non-GC heap (or a read-only GC heap?), where the heap the ptr is contained in contains information needed to identify the heap pointed to. (This might require a special "inter-heap ptr" type.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant