Closed hawkw closed 7 years ago
I think that, since we're using the RFC 1396 allocator API (see #72), which requires allocation & deallocation to take an &mut self
, the right way to go about this is to make a newtype for Mutex<Allocator>
/Mutex<Option<Allocator>>
for our global allocators. The borrowed handles can take a reference to that, rather than to the Allocator
instance itself.
Although I suspect @cjm00 will hate me for this, he global allocator newtype can also implement Deref
and DerefMut
by waiting to lock the allocator.
Needed for allocation handle implementation for the heap allocator.
See TODO here: