[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/29] plugins/hotpages: Properly freed the hash table values
From: |
Alex Bennée |
Subject: |
[PULL 29/29] plugins/hotpages: Properly freed the hash table values |
Date: |
Mon, 17 May 2021 17:10:22 +0100 |
From: Mahmoud Mandour <ma.mandourr@gmail.com>
Allocated ``pages`` hash table through ``g_hash_table_new_full`` to
add a freeing function & destroyed the hash table on exit.
Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210422005043.3569-3-ma.mandourr@gmail.com>
Message-Id: <20210505092259.8202-5-alex.bennee@linaro.org>
diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c
index bf53267532..9cf7f02c77 100644
--- a/contrib/plugins/hotpages.c
+++ b/contrib/plugins/hotpages.c
@@ -97,13 +97,14 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)
g_list_free(it);
}
+ g_hash_table_destroy(pages);
qemu_plugin_outs(report->str);
}
static void plugin_init(void)
{
page_mask = (page_size - 1);
- pages = g_hash_table_new(NULL, g_direct_equal);
+ pages = g_hash_table_new_full(NULL, g_direct_equal, NULL, g_free);
}
static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo,
--
2.20.1
- [PULL 20/29] tests/tcg/tricore: Add msub test, (continued)
- [PULL 20/29] tests/tcg/tricore: Add msub test, Alex Bennée, 2021/05/17
- [PULL 23/29] tests/tcg: fix missing return, Alex Bennée, 2021/05/17
- [PULL 21/29] tests/tcg/tricore: Add muls test, Alex Bennée, 2021/05/17
- [PULL 28/29] plugins/hotblocks: Properly freed the hash table values, Alex Bennée, 2021/05/17
- [PULL 16/29] tests/tcg/tricore: Add fadd test, Alex Bennée, 2021/05/17
- [PULL 15/29] tests/tcg/tricore: Add dvstep test, Alex Bennée, 2021/05/17
- [PULL 14/29] tests/tcg/tricore: Add clz test, Alex Bennée, 2021/05/17
- [PULL 27/29] plugins: Move all typedef and type declaration to the front of the qemu-plugin.h, Alex Bennée, 2021/05/17
- [PULL 22/29] tests/tcg/ppc64le: tests for brh/brw/brd, Alex Bennée, 2021/05/17
- [PULL 19/29] tests/tcg/tricore: Add madd test, Alex Bennée, 2021/05/17
- [PULL 29/29] plugins/hotpages: Properly freed the hash table values,
Alex Bennée <=
- [PULL 26/29] plugins: Update qemu-plugins.symbols to match qemu-plugins.h, Alex Bennée, 2021/05/17
- [PULL 17/29] tests/tcg/tricore: Add fmul test, Alex Bennée, 2021/05/17
- [PULL 24/29] tests/tcg: don't allow clang as a cross compiler, Alex Bennée, 2021/05/17
- [PULL 25/29] configure: use cc, not host_cc to set cross_cc for build arch, Alex Bennée, 2021/05/17
- Re: [PULL 00/29] testing and plugin updates, no-reply, 2021/05/17
- Re: [PULL 00/29] testing and plugin updates, Alex Bennée, 2021/05/17