Skip to content

Commit 92a8268

Browse files
committed
make warning an trace message if we cannot allocate at a hinted address, upstream of python/cpython#113372
1 parent c48a212 commit 92a8268

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/prim/unix/prim.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static void* unix_mmap_prim(void* addr, size_t size, size_t try_alignment, int p
198198
p = mmap(addr, size, protect_flags, flags | MAP_ALIGNED(n), fd, 0);
199199
if (p==MAP_FAILED || !_mi_is_aligned(p,try_alignment)) {
200200
int err = errno;
201-
_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);
201+
_mi_trace_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);
202202
}
203203
if (p!=MAP_FAILED) return p;
204204
// fall back to regular mmap
@@ -223,7 +223,7 @@ static void* unix_mmap_prim(void* addr, size_t size, size_t try_alignment, int p
223223
#else
224224
int err = errno;
225225
#endif
226-
_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);
226+
_mi_trace_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);
227227
}
228228
if (p!=MAP_FAILED) return p;
229229
// fall back to regular mmap

0 commit comments

Comments
 (0)