Add missing tracing to qemu_mallocz()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
16905d7175
commit
236e237681
@ -64,10 +64,13 @@ void *qemu_realloc(void *ptr, size_t size)
|
|||||||
|
|
||||||
void *qemu_mallocz(size_t size)
|
void *qemu_mallocz(size_t size)
|
||||||
{
|
{
|
||||||
|
void *ptr;
|
||||||
if (!size && !allow_zero_malloc()) {
|
if (!size && !allow_zero_malloc()) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
return qemu_oom_check(calloc(1, size ? size : 1));
|
ptr = qemu_oom_check(calloc(1, size ? size : 1));
|
||||||
|
trace_qemu_malloc(size, ptr);
|
||||||
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *qemu_strdup(const char *str)
|
char *qemu_strdup(const char *str)
|
||||||
|
Loading…
Reference in New Issue
Block a user