Add memory management rules, somewhat like libvirt HACKING.

Signed-off-by: Blue Swirl <blauwir...@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

Reply via email to