EmbarkStudios / rpmalloc-rs

🐏 rpmalloc global memory allocator for Rust 🦀
http://embark.rs
Apache License 2.0
136 stars 14 forks source link

Add support for ENABLE_OVERRIDE #5

Open repi opened 5 years ago

repi commented 5 years ago

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.

mjansson commented 5 years ago

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).

repi commented 5 years ago

Thanks for the heads up! Could see that being messy