There are a number of options, ranging from specifying jemalloc in the linking command line of the makefile on an opt-in basis, to distributing jemalloc's source itself. jemalloc improves dmd's run time by 15%. It's licensed via a BSD 4-clause license which specifically eliminates the dreaded binary attribution clause.
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18937 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB