Closed kyren closed 11 months ago
Marking as a draft until I at least check it in piccolo..
I have working memory tracking in piccolo with this and also #79, it works so I'm unmarking it as a draft.
It can be merged as is, but this is a little in the way atm of effectively using it https://github.com/zakarumych/allocator-api2/pull/5
Implements
Collect
for HashMap and HashSet from hashbrown, also Vec and Box from allocator-api2. Also implements a customAllocator
trait wrapper that records allocations and deallocations from gc-arena'sMetrics
handle, and is branded with the branding lifetime so it cannot be mixed up with other arena types.The implementation for hashbrown is slightly subtle because it is different depending on whether or not the "allocator-api2" feature is also enabled. Circle-CI now also checks all combinations of the features "allocator-api2" and "hashbrown" to make sure they all compile.
This also subsumes #73 as it it's hard to disentangle them