提交 f75ffc58 编写于 作者: M Marc Marí 提交者: Stefan Hajnoczi

libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

Reviewed-by: NJohn Snow <jsnow@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NMarc Marí <marc.mari.barcelo@gmail.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 ae74f187
......@@ -36,7 +36,7 @@ static uint64_t pc_alloc(QGuestAllocator *allocator, size_t size)
size += (PAGE_SIZE - 1);
size &= PAGE_SIZE;
size &= -PAGE_SIZE;
g_assert_cmpint((s->start + size), <=, s->end);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册