aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/malloc.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-10-16 18:29:38 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-10-16 18:29:38 +0100
commite24cdd07216890d24468cdcbdd5a3e60b3e9f23b (patch)
treed6d3181b72eeee66cebd40f1f23da623a37421fe /tests/libqos/malloc.c
parentc5bbcaa4b7c0f8a322bebe9ec563560178a68b55 (diff)
parent03bf6b5c08c792f5c2b55d6038e9a6acbf43d9c3 (diff)
Merge remote-tracking branch 'remotes/huth/tags/pull-request-2017-10-16' into staging
Some m68k, qtest and config improvements # gpg: Signature made Mon 16 Oct 2017 13:38:03 BST # gpg: using RSA key 0x2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" # gpg: aka "Thomas Huth <thuth@redhat.com>" # gpg: aka "Thomas Huth <huth@tuxfamily.org>" # gpg: aka "Thomas Huth <th.huth@posteo.de>" # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth/tags/pull-request-2017-10-16: default-configs: Enable CONFIG_VMXNET3_PCI only on x86 tests/prom-env: Bump the timeout, and test pseries only in slow mode tests: use g_new() family of functions M68K: use g_new() family of functions hw/m68k: Replace fprintf(stderr, "*\n" with error_report() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/libqos/malloc.c')
-rw-r--r--tests/libqos/malloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/libqos/malloc.c b/tests/libqos/malloc.c
index b8eff5f495..ac05874b0a 100644
--- a/tests/libqos/malloc.c
+++ b/tests/libqos/malloc.c
@@ -129,7 +129,7 @@ static MemBlock *mlist_new(uint64_t addr, uint64_t size)
if (!size) {
return NULL;
}
- block = g_malloc0(sizeof(MemBlock));
+ block = g_new0(MemBlock, 1);
block->addr = addr;
block->size = size;
@@ -305,8 +305,8 @@ QGuestAllocator *alloc_init(uint64_t start, uint64_t end)
s->start = start;
s->end = end;
- s->used = g_malloc(sizeof(MemList));
- s->free = g_malloc(sizeof(MemList));
+ s->used = g_new(MemList, 1);
+ s->free = g_new(MemList, 1);
QTAILQ_INIT(s->used);
QTAILQ_INIT(s->free);