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
Background: To do concurrent collection, we need an efficient way of checking whether or not a chunk is in scope of the collection. Currently this is done by, at the beginning of collection, marking each in-scope chunk with a identifier that
uniquely identifies the collection. Then we can determine if a chunk is in-scope by inspecting the identifier. When CC was implemented, this was perfectly safe, because chunk descriptors (where the identifier is stored) were never overwritten
throughout execution.
Problem: Under the new chunk allocator design (#135), this approach is no longer safe. Chunks freed by local collections might be recycled into a different size class, causing their chunk descriptor to be potentially overwritten. The likelihood of this causing a problem in practice, however, is exceedingly rare.
Suggested solution: At the beginning of CC, construct a hash-set of in-scope chunk ids. To check that an object is in-scope, get its chunk id (by masking its address) and check if the chunk-id is in the hash-set.
The text was updated successfully, but these errors were encountered:
Background: To do concurrent collection, we need an efficient way of checking whether or not a chunk is in scope of the collection. Currently this is done by, at the beginning of collection, marking each in-scope chunk with a identifier that
uniquely identifies the collection. Then we can determine if a chunk is in-scope by inspecting the identifier. When CC was implemented, this was perfectly safe, because chunk descriptors (where the identifier is stored) were never overwritten
throughout execution.
Problem: Under the new chunk allocator design (#135), this approach is no longer safe. Chunks freed by local collections might be recycled into a different size class, causing their chunk descriptor to be potentially overwritten. The likelihood of this causing a problem in practice, however, is exceedingly rare.
Suggested solution: At the beginning of CC, construct a hash-set of in-scope chunk ids. To check that an object is in-scope, get its chunk id (by masking its address) and check if the chunk-id is in the hash-set.
The text was updated successfully, but these errors were encountered: