3 ms·
You can avoid reference counting overhead by using handles as described in this article. Each object in a slab would have just one reference, and you handles wo
by asdfasgasdgasdg 6y ago
You can avoid reference counting overhead by using handles as described in this article. Each object in a slab would have just one reference, and you handles would be indexes into an array of them. Now, after you do that you will be on be hook for making sure you don't accidentally deallocate any of the objects that is currently in use. And it's not guaranteed to be faster. But it is one way to get around this issue.
- benibela 6y agoI do not understand how this would help It would still need reference counting on the handles to know when the handle is not used anymore and the element in the array can be reused Without reusing handles it would surely run out of memory. Unless a full GC is used