cpus: remove ugly cast on sigbus_handler
[qemu/ar7.git] / tests / libqos / malloc-spapr.c
blob006404af330ff4d7e8895b26091662c9071c8bc1
1 /*
2 * libqos malloc support for SPAPR
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
8 #include "qemu/osdep.h"
9 #include "libqos/malloc-spapr.h"
11 #include "qemu-common.h"
13 #define PAGE_SIZE 4096
15 /* Memory must be a multiple of 256 MB,
16 * so we have at least 256MB
18 #define SPAPR_MIN_SIZE 0x10000000
20 void spapr_alloc_uninit(QGuestAllocator *allocator)
22 alloc_uninit(allocator);
25 QGuestAllocator *spapr_alloc_init_flags(QAllocOpts flags)
27 QGuestAllocator *s;
29 s = alloc_init_flags(flags, 1 << 20, SPAPR_MIN_SIZE);
30 alloc_set_page_size(s, PAGE_SIZE);
32 return s;
35 QGuestAllocator *spapr_alloc_init(void)
37 return spapr_alloc_init_flags(ALLOC_NO_FLAGS);