In the case of the project I quoted: it's very heavily oriented towards multiple threads for various subsystems, and I'm always using cmem because it can dynamically link a library to dump a (large) file for logic analysis or (potentially) to attach a non-standard peripheral. I'm fairly confident in its memory and thread management because multiple threads can output state info through the library simultaneously.
I was going to muse on whether, since the order is significant, both cmem and heaptrace insertion should ideally be done by the compiler. However since I'm talking about on-demand .so library loading rather than at-startup, this is probably outside what the compiler/linker could be expected to handle even if hinted by a commandline option.
What we obviously /don't/ want however is for either the compiler or the Lazarus IDE to try to rearrange things: I've already had situations where "LineInfo" was automagically rewritten to "lnfodwrf" which didn't help when I was trying to write my code to detect and report what format of debugging was being used.
MarkMLl