rpmalloc-rs icon indicating copy to clipboard operation
rpmalloc-rs copied to clipboard

Add support for ENABLE_OVERRIDE

Open repi opened this issue 5 years ago • 2 comments

To enable rpmalloc's overriding of C malloc/free functions, this enables rpmalloc to be used instead of the system allocator for C/C++ code dependencies as well, not just for Rust code.

Easy to enable (and should be a feature flag on the crates) but do have to make sure it links properly on all platforms and targets.

repi avatar Nov 05 '19 11:11 repi

One caveat is that symbol replacing on Windows platforms is a proper pain and not currently implemented in rpmalloc (code for it can be found in the tcmalloc container project, gperftools, but it's quite nasty).

mjansson avatar Nov 09 '19 14:11 mjansson

Thanks for the heads up! Could see that being messy

repi avatar Nov 09 '19 14:11 repi