qemu-patch-raspberry4/tests/libqos/malloc-pc.h
Marc Marí 292be092ad 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>
2015-01-13 11:47:57 +00:00

23 lines
503 B
C

/*
* libqos malloc support for PC
*
* Copyright IBM, Corp. 2012-2013
*
* Authors:
* Anthony Liguori <aliguori@us.ibm.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#ifndef LIBQOS_MALLOC_PC_H
#define LIBQOS_MALLOC_PC_H
#include "libqos/malloc.h"
QGuestAllocator *pc_alloc_init(void);
QGuestAllocator *pc_alloc_init_flags(QAllocOpts flags);
void pc_alloc_uninit(QGuestAllocator *allocator);
#endif