From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Greg Kurz <gkurz@linux.vnet.ibm.com>,
David Gibson <david@gibson.dropbear.id.au>,
Eduardo Habkost <ehabkost@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH RFC 1/2] add bitmap_free() wrapper
Date: Wed, 16 Nov 2016 17:02:55 +0100 [thread overview]
Message-ID: <1479312176-224580-2-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1479312176-224580-1-git-send-email-imammedo@redhat.com>
it will be used for freeing bitmaps allocated with bitmap_[try]_new()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
include/qemu/bitmap.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h
index 63ea2d0..0289836 100644
--- a/include/qemu/bitmap.h
+++ b/include/qemu/bitmap.h
@@ -98,6 +98,11 @@ static inline unsigned long *bitmap_new(long nbits)
return ptr;
}
+static inline void bitmap_free(unsigned long *bitmap)
+{
+ g_free(bitmap);
+}
+
static inline void bitmap_zero(unsigned long *dst, long nbits)
{
if (small_nbits(nbits)) {
--
2.7.4
next prev parent reply other threads:[~2016-11-16 16:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 16:02 [Qemu-devel] [PATCH RFC 0/2] numa: allocate CPUs masks dynamically Igor Mammedov
2016-11-16 16:02 ` Igor Mammedov [this message]
2016-11-16 17:05 ` [Qemu-devel] [PATCH RFC 1/2] add bitmap_free() wrapper Eduardo Habkost
2016-11-16 16:02 ` [Qemu-devel] [PATCH RFC 2/2] numa: make -numa parser dynamically allocate CPUs masks Igor Mammedov
2016-11-16 17:08 ` Eduardo Habkost
2016-11-18 8:36 ` Igor Mammedov
2016-11-17 6:27 ` [Qemu-devel] [PATCH RFC 0/2] numa: allocate CPUs masks dynamically Alexey Kardashevskiy
2016-11-21 18:46 ` Greg Kurz
2016-11-22 3:05 ` Alexey Kardashevskiy
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=1479312176-224580-2-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=gkurz@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).