I still can't understand why there is SleepEx in borlandmm, what version are they using.
My XE8 doesn't have SleepEx, also looking at FastMM4 it has Sleep but not SleepEx, using SleepEx indicate the intention to wait on signal to wake, also FastMM5 doens't have either, simple and doesn't wait with Sleep,
So, does replacing that borlandmm with another one change behavior ?
Try to a replacement and see, at least it would eliminate the cause from memory manager,
https://github.com/pleriche/FastMM4
https://github.com/pleriche/FastMM5
One idea i can think of, they used modified MM (that include SleepEx) is to integrate some part of the
IDE/Compiler which compiled with different compiler/language, and in case different MM used then will revert to some layer to use, who knows ?!
Another idea, their MM is broken and buggy, and they know it, so they introduced SleepEx instead of different spinning/locking mechanism to solve an issue, in an attempt to unlock it, again who knows ?!