Christian Heimes <li...@cheimes.de> added the comment:

ICC 2021 has full support for stdatomic.h and compiles mimalloc just fine:

$ CC="icc" ./configure -C --with-pydebug
$ make
$ ./python
Python 3.11.0a5+ (main, Feb  9 2022, 15:57:40) [GCC Intel(R) C++ gcc 7.5 mode] 
on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._malloc_info
sys._malloc_info(allocator='mimalloc_debug', with_pymalloc=True, 
with_mimalloc=True, mimalloc_secure=4, mimalloc_debug=2)


AIX xlc is still a problem. It does not support C11 stdatomic.h. But it comes 
with older GCC atomic memory access __sync function family, 
https://www.ibm.com/docs/en/xl-c-and-cpp-aix/13.1.3?topic=cbif-gcc-atomic-memory-access-built-in-functions-extension
 . It might be possible to re-implement mimalloc's atomics with __sync 
functions (e.g. https://gist.github.com/nhatminhle/5181506). The implementation 
would be less efficient, though. The __sync functions don't have memory order, 
atomic_load_explicit(v) becomes __sync_fetch_and_add(v, 0), and 
atomic_store_explicit() requires two full memory barriers.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to