All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: marc.mari.barcelo@gmail.com, pbonzini@redhat.com,
	jsnow@redhat.com, afaerber@suse.de, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v3 1/4] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc
Date: Fri,  1 Aug 2014 11:38:56 -0400	[thread overview]
Message-ID: <1406907539-18757-2-git-send-email-jsnow@redhat.com> (raw)
In-Reply-To: <1406907539-18757-1-git-send-email-jsnow@redhat.com>

From: Marc Marí <marc.mari.barcelo@gmail.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Marc Marí <marc.mari.barcelo@gmail.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/libqos/malloc-pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c
index db1496c..2efd095 100644
--- a/tests/libqos/malloc-pc.c
+++ b/tests/libqos/malloc-pc.c
@@ -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);
 
-- 
1.9.3

  reply	other threads:[~2014-08-01 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 15:38 [Qemu-devel] [PATCH v3 0/4] libqos: add a simple first-fit memory allocator John Snow
2014-08-01 15:38 ` John Snow [this message]
2014-08-01 15:38 ` [Qemu-devel] [PATCH v3 2/4] libqos: Change free function called in malloc John Snow
2014-08-01 15:38 ` [Qemu-devel] [PATCH v3 3/4] libqos: add a simple first-fit memory allocator John Snow
2014-08-01 15:38 ` [Qemu-devel] [PATCH v3 4/4] qtest/ide: Uninitialize PC allocator John Snow
2014-08-05  9:46 ` [Qemu-devel] [PATCH v3 0/4] libqos: add a simple first-fit memory allocator Stefan Hajnoczi
2014-08-19 16:36   ` John Snow
2014-09-04 14:13 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406907539-18757-2-git-send-email-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=afaerber@suse.de \
    --cc=marc.mari.barcelo@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.