return popt;
}
+#if !GLIB_CHECK_VERSION(2, 46, 0)
static gpointer malloc_and_trace(gsize n_bytes)
{
void *ptr = malloc(n_bytes);
trace_g_free(mem);
free(mem);
}
+#endif
static int object_set_property(const char *name, const char *value, void *opaque)
{
bool userconfig = true;
const char *log_mask = NULL;
const char *log_file = NULL;
+#if !GLIB_CHECK_VERSION(2, 46, 0)
GMemVTable mem_trace = {
.malloc = malloc_and_trace,
.realloc = realloc_and_trace,
.free = free_and_trace,
};
+#endif
const char *trace_events = NULL;
const char *trace_file = NULL;
error_set_progname(argv[0]);
qemu_init_exec_dir(argv[0]);
+#if !GLIB_CHECK_VERSION(2, 46, 0)
g_mem_set_vtable(&mem_trace);
+#endif
module_call_init(MODULE_INIT_QOM);