All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 3/5] CODING_STYLE: add memory management rules
@ 2010-08-12 17:50 Blue Swirl
  2010-08-13 19:24 ` [Qemu-devel] " Blue Swirl
  0 siblings, 1 reply; 9+ messages in thread
From: Blue Swirl @ 2010-08-12 17:50 UTC (permalink / raw)
  To: qemu-devel

Add memory management rules, somewhat like libvirt HACKING.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 CODING_STYLE |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/CODING_STYLE b/CODING_STYLE
index 3f10d72..085c86f 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -148,3 +148,11 @@ up-front that this is a read-only pointer.  Perhaps more
 importantly, if we're diligent about this, when you see a non-const
 pointer, you're guaranteed that it is used to modify the storage
 it points to, or it is aliased to another pointer that is.
+
+
+7. Low level memory management
+
+Use of the malloc/free/realloc/calloc APIs is not allowed in the QEMU
+codebase. Instead of these routines, use the replacement
+qemu_malloc/qemu_mallocz/qemu_realloc/qemu_free or
+qemu_vmalloc/qemu_memalign/qemu_vfree APIs.
-- 
1.6.2.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-08-15 16:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12 17:50 [Qemu-devel] [PATCH 3/5] CODING_STYLE: add memory management rules Blue Swirl
2010-08-13 19:24 ` [Qemu-devel] " Blue Swirl
2010-08-13 21:01   ` malc
2010-08-13 21:28     ` Blue Swirl
2010-08-13 21:56       ` malc
2010-08-14 10:02         ` Blue Swirl
2010-08-14 14:52           ` Andreas Färber
2010-08-15 14:07             ` Paolo Bonzini
2010-08-15 16:06     ` Avi Kivity

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.