mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
rename qemu_malloc and related to glib names for coherence
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1901cb14ed
commit
a74cd8cc37
@ -14,7 +14,7 @@
|
||||
#
|
||||
# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
|
||||
#
|
||||
# Example: qemu_malloc(size_t size) "size %zu"
|
||||
# Example: g_malloc(size_t size) "size %zu"
|
||||
#
|
||||
# The "disable" keyword will build without the trace event.
|
||||
#
|
||||
@ -26,9 +26,9 @@
|
||||
# The <format-string> should be a sprintf()-compatible format string.
|
||||
|
||||
# qemu-malloc.c
|
||||
qemu_malloc(size_t size, void *ptr) "size %zu ptr %p"
|
||||
qemu_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
|
||||
qemu_free(void *ptr) "ptr %p"
|
||||
g_malloc(size_t size, void *ptr) "size %zu ptr %p"
|
||||
g_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
|
||||
g_free(void *ptr) "ptr %p"
|
||||
|
||||
# osdep.c
|
||||
qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
|
||||
|
6
vl.c
6
vl.c
@ -2144,20 +2144,20 @@ static const QEMUOption *lookup_opt(int argc, char **argv,
|
||||
static gpointer malloc_and_trace(gsize n_bytes)
|
||||
{
|
||||
void *ptr = malloc(n_bytes);
|
||||
trace_qemu_malloc(n_bytes, ptr);
|
||||
trace_g_malloc(n_bytes, ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static gpointer realloc_and_trace(gpointer mem, gsize n_bytes)
|
||||
{
|
||||
void *ptr = realloc(mem, n_bytes);
|
||||
trace_qemu_realloc(mem, n_bytes, ptr);
|
||||
trace_g_realloc(mem, n_bytes, ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static void free_and_trace(gpointer mem)
|
||||
{
|
||||
trace_qemu_free(mem);
|
||||
trace_g_free(mem);
|
||||
free(mem);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user