Allocators should allocate memory with an internal reference counter. A new API method, share, can be given an offset previously generated by an allocate function, to increment this reference counter. Any calls to deallocate will decrement the counter, and once it reaches 0, free memory.
Allocators should allocate memory with an internal reference counter. A new API method, share, can be given an offset previously generated by an allocate function, to increment this reference counter. Any calls to deallocate will decrement the counter, and once it reaches 0, free memory.