You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
[imported from HPE issue 267]
Our current code assumes that all
gc_ptr
s andoffset_ptr
s 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>
togc_ptr<N,T>
, whereN
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 identifyoffset_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.)The text was updated successfully, but these errors were encountered: