I will have to create a multi-threading project soon I have seen experiments ( delphitools.info/2011/10/13/memory-manager-investigations ) showing that the default Delphi memory manager has problems with multi-threading.

So, I have found this SynScaleMM. Anybody can give some feedback on it or on a similar memory manager?
Thanks
Our SynScaleMM is still experimental.
EDIT: Take a look at the more stable ScaleMM2 and the brand new SAPMM. But my remarks below are still worth following: the less allocation you do, the better you scale!
But it worked as expected in a multi-threaded server environment. Scaling is much better than FastMM4, for some critical tests.
But the Memory Manager is perhaps not the bigger bottleneck in Multi-Threaded applications. FastMM4 could work well, if you don’t stress it.
Here are some (not dogmatic, just from experiment and knowledge of low-level Delphi RTL) advice if you want to write FAST multi-threaded application in Delphi:
constfor string or dynamic array parameters like inMyFunc(const aString: String)to avoid allocating a temporary string per each call;s := s+'Blabla'+IntToStr(i)) , but rely on a buffered writing such asTStringBuilderavailable in latest versions of Delphi;TStringBuilderis not perfect either: for instance, it will create a lot of temporary strings for appending some numerical data, and will use the awfully slowSysUtils.IntToStr()function when you add someintegervalue – I had to rewrite a lot of low-level functions to avoid most string allocation in ourTTextWriterclass as defined in SynCommons.pas;InterlockedIncrement / InterlockedExchangeAdd;InterlockedExchange(from SysUtils.pas) is a good way of updating a buffer or a shared object. You create an updated version of of some content in your thread, then you exchange a shared pointer to the data (e.g. aTObjectinstance) in one low-level CPU operation. It will notify the change to the other threads, with very good multi-thread scaling. You’ll have to take care of the data integrity, but it works very well in practice.PosEx()for instance;AnsiString/UnicodeStringkind of variables/functions, and check the generated asm code via Alt-F2 to track any hidden unwanted conversion (e.g.call UStrFromPCharLen);varparameters in aprocedureinstead offunctionreturning a string (a function returning astringwill add anUStrAsg/LStrAsgcall which has a LOCK which will flush all CPU cores);TMemoryStreameach time you need one, but rely on a private instance in your class, already sized in enough memory, in which you will write data usingPositionto retrieve the end of data and not changing itsSize(which will be the memory block allocated by the MM);record/objectpointers on already allocated memory buffers, mapping the data without copying it into temporary memory;I tried to follow those rules in our Open Source framework, and if you take a look at our code, you’ll find out a lot of real-world sample code.