diff options
author | Sam Gross <colesbury@gmail.com> | 2023-12-22 00:38:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-22 00:38:27 (GMT) |
commit | 9afb0e1606cad41ed57c42ea0a53ac90433f211b (patch) | |
tree | f0cba61538b80d03fb0f8694c7482401f845a01c /Objects | |
parent | 7de9855410d034b2b7624a057dbf7c3f58ee5328 (diff) | |
download | cpython-9afb0e1606cad41ed57c42ea0a53ac90433f211b.zip cpython-9afb0e1606cad41ed57c42ea0a53ac90433f211b.tar.gz cpython-9afb0e1606cad41ed57c42ea0a53ac90433f211b.tar.bz2 |
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.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/mimalloc/prim/unix/prim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/mimalloc/prim/unix/prim.c b/Objects/mimalloc/prim/unix/prim.c index cffbb2d..2152017 100644 --- a/Objects/mimalloc/prim/unix/prim.c +++ b/Objects/mimalloc/prim/unix/prim.c @@ -170,7 +170,7 @@ static void* unix_mmap_prim(void* addr, size_t size, size_t try_alignment, int p p = mmap(addr, size, protect_flags, flags | MAP_ALIGNED(n), fd, 0); if (p==MAP_FAILED || !_mi_is_aligned(p,try_alignment)) { int err = errno; - _mi_warning_message("unable to directly request aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\n", err, err, size, try_alignment, addr); + _mi_verbose_message("unable to directly request aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\n", err, err, size, try_alignment, addr); } if (p!=MAP_FAILED) return p; // fall back to regular mmap @@ -195,7 +195,7 @@ static void* unix_mmap_prim(void* addr, size_t size, size_t try_alignment, int p #else int err = errno; #endif - _mi_warning_message("unable to directly request hinted aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\n", err, err, size, try_alignment, hint); + _mi_verbose_message("unable to directly request hinted aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\n", err, err, size, try_alignment, hint); } if (p!=MAP_FAILED) return p; // fall back to regular mmap |