aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/malloc-pc.h
diff options
context:
space:
mode:
authorMarc MarĂ­ <marc.mari.barcelo@gmail.com>2014-10-23 10:12:42 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2015-01-13 11:47:57 +0000
commit292be092ad48ac530dd254ada109851e9a2353f5 (patch)
tree03e1e14f634fd7ea470dd747a5ccd2695798a26f /tests/libqos/malloc-pc.h
parent04636dc410b163c2243e66c3813dd4900a50a4ed (diff)
downloadqemu-292be092ad48ac530dd254ada109851e9a2353f5.zip
qemu-292be092ad48ac530dd254ada109851e9a2353f5.tar.gz
qemu-292be092ad48ac530dd254ada109851e9a2353f5.tar.bz2
libqos: Convert malloc-pc allocator to a generic allocator
The allocator in malloc-pc has been extracted, so it can be used in every arch. This operation showed that both the alloc and free functions can be also generic. Because of this, the QGuestAllocator has been removed from is function to wrap the alloc and free function, and now just contains the allocator parameters. As a result, only the allocator initalizer and unitializer are arch dependent. Signed-off-by: Marc MarĂ­ <marc.mari.barcelo@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/libqos/malloc-pc.h')
-rw-r--r--tests/libqos/malloc-pc.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/libqos/malloc-pc.h b/tests/libqos/malloc-pc.h
index 9f525e3..86ab9f0 100644
--- a/tests/libqos/malloc-pc.h
+++ b/tests/libqos/malloc-pc.h
@@ -15,15 +15,8 @@
#include "libqos/malloc.h"
-typedef enum {
- PC_ALLOC_NO_FLAGS = 0x00,
- PC_ALLOC_LEAK_WARN = 0x01,
- PC_ALLOC_LEAK_ASSERT = 0x02,
- PC_ALLOC_PARANOID = 0x04
-} PCAllocOpts;
-
QGuestAllocator *pc_alloc_init(void);
-QGuestAllocator *pc_alloc_init_flags(PCAllocOpts flags);
-void pc_alloc_uninit(QGuestAllocator *allocator);
+QGuestAllocator *pc_alloc_init_flags(QAllocOpts flags);
+void pc_alloc_uninit(QGuestAllocator *allocator);
#endif