Open rajan-chari opened 5 years ago
What are the use cases of this?
Seems like there is a standard way to do this at least:
We would need to ensure that this allocator is realloc-compatible, or rethink the realloc codepaths.
In particular, we do realloc here:
There is also a question about passing it in to underlying libraries, e.g. RapidJSON. But that seems to have an allocator interface: https://github.com/Tencent/rapidjson/blob/master/include/rapidjson/allocators.h
A bit of context about realloc and std::allocator: https://stackoverflow.com/questions/6391057/realloc-in-standard-allocator
Allow users of vw library to provide their own allocator.