[llvm-dev] [cfe-dev] RFC: Replacing the default CRT allocator on Windows

Michael Kruse via llvm-dev
Thu, 02 Jul 2020 04:53:53 -0000

I'd appreciate the speed-up due to the inclusion of an alternative
malloc and the ease of using it if its source was included in the LLVM
repository. We already have multiple sources from external projects
included in the repository (among them gtest, gmock, ConvertUTF,
google benchmark, ISL, ...) and don't see a reason why it should be
different for a malloc implementation.

AFAIK replacing malloc is quite common for Windows projects. The
Windows default implementation (called "low fragmentation heap") has
different optimization goals.

I'd start with including it in the repository and providing the option
to enable it, with the possibility to change it to the default after
some experience has been collected, maybe even with multiple malloc
implementations.

Michael