aboutsummaryrefslogtreecommitdiff
path: root/block/raw-win32.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-10-01 13:04:39 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2015-10-12 11:17:45 +0100
commitc84b31926f018af6fea2ab37a1fc47060b4bcfa1 (patch)
treec59a666dd58f626616bb85f606a347fd3bc6c1cf /block/raw-win32.c
parenta9718ef0005d6910097788936dc40c0204713729 (diff)
block: switch from g_slice allocator to malloc
Simplify memory allocation by sticking with a single API. GSlice is not that fast anyway (tcmalloc/jemalloc are better). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index b562c94dad..2d0907a822 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -135,7 +135,7 @@ static int aio_worker(void *arg)
break;
}
- g_slice_free(RawWin32AIOData, aiocb);
+ g_free(aiocb);
return ret;
}
@@ -143,7 +143,7 @@ static BlockAIOCB *paio_submit(BlockDriverState *bs, HANDLE hfile,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque, int type)
{
- RawWin32AIOData *acb = g_slice_new(RawWin32AIOData);
+ RawWin32AIOData *acb = g_new(RawWin32AIOData, 1);
ThreadPool *pool;
acb->bs = bs;