pleriche / FastMM5

FastMM is a fast replacement memory manager for Embarcadero Delphi applications that scales well across multiple threads and CPU cores, is not prone to memory fragmentation, and supports shared memory without the use of external .DLL files.
283 stars 73 forks source link

Add atomic operation functions to improve code compatibility with Delphi XE2 #49

Open delphilite opened 4 months ago

delphilite commented 4 months ago

Hello Pierre le Riche, I have always been a big fan of FastMM4, thank you for your work over the years. I noticed that FastMM5 cannot be compiled in XE2 environment. With reference to some other code, I have completed the missing atomic operations and modified the compatibility of the compilation instructions. The modifications have passed simple tests under Delphi XE2 and 12. I hope this PR can be accepted.

pleriche commented 4 months ago

Hi,

Thank you for the kind words and the pull request. The decision regarding which versions to support in FastMM5 was not an easy one. The fact that XE2 does not have the atomic operations played a part, but I recall that there were also compiler bugs. I can't remember the details, but the fact that you got it working with XE2 suggests they probably didn't end up being an issue.

I don't currently have XE2 installed, but I'll put testing the XE2 support on my to-do list. In the meantime I'll leave the pull request open so anyone who wants XE2 support can merge it themselves.