Commit Graph

10 Commits

Author SHA1 Message Date
Samuel Thibault d005f2c186
gh-121731: Fix mimalloc compile error on GNU/Hurd (#121732) 2024-07-14 12:50:25 -04:00
Sam Gross 2067da2579
gh-117547: Fix mimalloc compile error on OpenBSD (#117548) 2024-04-08 11:53:13 -04:00
cui fliter e7ba6e9dbe
chore: fix typos (#116345)
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-03-05 09:05:52 -07:00
Jakub Kulík 10d3f04aec
gh-112808: Fix mimalloc build on Solaris (#112809) 2024-01-08 15:50:56 -08:00
Jakub Kulík ae968d1032
gh-112806: Remove unused function warnings during mimalloc build on Solaris (#112807) 2024-01-08 15:49:33 -08:00
Sam Gross 9afb0e1606
gh-112027: Don't print mimalloc warning after mmap() call (gh-113372)
gh-112027: Don't print mimalloc warning after mmap

This changes the warning to a "verbose"-level message in prim.c. The
address passed to mmap is only a hint -- it's normal for mmap() to
sometimes not respect the hint and return a different address.
2023-12-22 09:38:27 +09:00
Furkan Onder 0ff6368519
gh-111906: Fix warnings during mimalloc build on FreeBSD (#111907)
Fix `unused function` warnings during mimalloc build on FreeBSD.
2023-11-14 17:07:46 +01:00
Ayappan Perumal 794dff2fb1
gh-111544: Fix mimalloc build on AIX (#111593) 2023-11-02 08:01:50 +01:00
Victor Stinner 1673e44017
gh-90815: Fix mimalloc build on WASI (#111524)
Include <unistd.h> to get sbrk() function.
2023-10-30 23:10:22 +01:00
Dino Viehland 05f2f0ac92
gh-90815: Add mimalloc memory allocator (#109914)
* Add mimalloc v2.12

Modified src/alloc.c to remove include of alloc-override.c and not
compile new handler.

Did not include the following files:

 - include/mimalloc-new-delete.h
 - include/mimalloc-override.h
 - src/alloc-override-osx.c
 - src/alloc-override.c
 - src/static.c
 - src/region.c

mimalloc is thread safe and shares a single heap across all runtimes,
therefore finalization and getting global allocated blocks across all
runtimes is different.

* mimalloc: minimal changes for use in Python:

 - remove debug spam for freeing large allocations
 - use same bytes (0xDD) for freed allocations in CPython and mimalloc
   This is important for the test_capi debug memory tests

* Don't export mimalloc symbol in libpython.
* Enable mimalloc as Python allocator option.
* Add mimalloc MIT license.
* Log mimalloc in Lib/test/pythoninfo.py.
* Document new mimalloc support.
* Use macro defs for exports as done in:
  https://github.com/python/cpython/pull/31164/

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-30 15:43:11 +00:00