Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1cbde3a

Browse filesBrowse files
colesburyGlyphack
authored andcommitted
pythongh-112027: Don't print mimalloc warning after mmap() call (pythongh-113372)
pythongh-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.
1 parent 7a592bb commit 1cbde3a
Copy full SHA for 1cbde3a

File tree

1 file changed

+2
-2
lines changed
Filter options
  • Objects/mimalloc/prim/unix

1 file changed

+2
-2
lines changed

‎Objects/mimalloc/prim/unix/prim.c

Copy file name to clipboardExpand all lines: Objects/mimalloc/prim/unix/prim.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static void* unix_mmap_prim(void* addr, size_t size, size_t try_alignment, int p
170170
p = mmap(addr, size, protect_flags, flags | MAP_ALIGNED(n), fd, 0);
171171
if (p==MAP_FAILED || !_mi_is_aligned(p,try_alignment)) {
172172
int err = errno;
173-
_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);
173+
_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);
174174
}
175175
if (p!=MAP_FAILED) return p;
176176
// 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
195195
#else
196196
int err = errno;
197197
#endif
198-
_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);
198+
_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);
199199
}
200200
if (p!=MAP_FAILED) return p;
201201
// fall back to regular mmap

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.