change output of memory tools for readability
This commit is contained in:
parent
c6a903ffaf
commit
5372c52092
1 changed files with 6 additions and 5 deletions
|
@ -66,8 +66,8 @@ custom_malloc(size_t size)
|
||||||
void * memory = malloc(size);
|
void * memory = malloc(size);
|
||||||
uint64_t fw_size = size;
|
uint64_t fw_size = size;
|
||||||
MALLOC_PRINTF(
|
MALLOC_PRINTF(
|
||||||
"malloc expected(%s): %p %" PRIu64 "\n",
|
" malloc (%s) %p %" PRIu64 "\n",
|
||||||
malloc_expected ? "true " : "false", memory, fw_size);
|
malloc_expected ? " expected" : "not expected", memory, fw_size);
|
||||||
return memory;
|
return memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,8 +108,8 @@ custom_realloc(void * memory_in, size_t size)
|
||||||
void * memory = realloc(memory_in, size);
|
void * memory = realloc(memory_in, size);
|
||||||
uint64_t fw_size = size;
|
uint64_t fw_size = size;
|
||||||
MALLOC_PRINTF(
|
MALLOC_PRINTF(
|
||||||
"realloc expected(%s): %p %p %" PRIu64 "\n",
|
"realloc (%s) %p %p %" PRIu64 "\n",
|
||||||
malloc_expected ? "true " : "false", memory_in, memory, fw_size);
|
malloc_expected ? " expected" : "not expected", memory_in, memory, fw_size);
|
||||||
return memory;
|
return memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,8 @@ custom_free(void * memory)
|
||||||
(*unexpected_free_callback)();
|
(*unexpected_free_callback)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MALLOC_PRINTF("free expected(%s): %p\n", malloc_expected ? "true " : "false", memory);
|
MALLOC_PRINTF(
|
||||||
|
" free (%s) %p\n", malloc_expected ? " expected" : "not expected", memory);
|
||||||
free(memory);
|
free(memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue