purpleprotocol / mimalloc_rust

A Rust wrapper over Microsoft's MiMalloc memory allocator
MIT License
503 stars 41 forks source link

Debug builds print stats to stderr #4

Closed Speedy37 closed 5 years ago

Speedy37 commented 5 years ago

By default, mimalloc print stats to stderr at some events (thread exit, process exit, ...).

I don't think this is desired.

This is controlled by the #define MI_DEBUG in C and can be overwritten though C flags in cmake.

Canop commented 5 years ago

This is a blocking problem, especially for terminal applications, and it makes mimalloc look like just an experiment.

What's the status on this ?

Speedy37 commented 5 years ago

I can fix it now, I was waiting to see how cmakefiles evolve in the microsoft mimalloc repository.

In the current form, setting MI_DEBUG to 0 via build.rs should fix this.

octavonce commented 5 years ago

@Canop Note that this only happens in debug builds currently. This is because mimalloc's CMakeLists.txt turns on MI_DEBUG if the target directory or any of it's parents is named "debug".

Releases are fine.