fix hex formatting of errors

This commit is contained in:
Daan Leijen 2023-03-29 13:00:35 -07:00
parent 5bc724d18f
commit 1cb0193ff1
2 changed files with 5 additions and 5 deletions

View file

@ -375,7 +375,7 @@ static bool mi_os_commitx(void* addr, size_t size, bool commit, bool conservativ
int err = _mi_prim_commit(start, csize, commit);
if (err != 0) {
_mi_warning_message("cannot %s OS memory (error: %d (0x%d), address: %p, size: 0x%zx bytes)\n", commit ? "commit" : "decommit", err, err, start, csize);
_mi_warning_message("cannot %s OS memory (error: %d (0x%x), address: %p, size: 0x%zx bytes)\n", commit ? "commit" : "decommit", err, err, start, csize);
}
mi_assert_internal(err == 0);
return (err == 0);
@ -533,7 +533,7 @@ void* _mi_os_alloc_huge_os_pages(size_t pages, int numa_node, mi_msecs_t max_mse
void* p = NULL;
int err = _mi_prim_alloc_huge_os_pages(addr, MI_HUGE_OS_PAGE_SIZE, numa_node, &p);
if (err != 0) {
_mi_warning_message("unable to allocate huge OS page (error: %d (0x%d), address: %p, size: %zx bytes)\n", err, err, addr, MI_HUGE_OS_PAGE_SIZE);
_mi_warning_message("unable to allocate huge OS page (error: %d (0x%x), address: %p, size: %zx bytes)\n", err, err, addr, MI_HUGE_OS_PAGE_SIZE);
break;
}