aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-06-10 11:25:39 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-09-02 17:57:01 +0200
commit32ee080ccdde8a90d5ee3b56e28f95ada35dee4c (patch)
treecf012ae02e838db320cbc1233e4db8982090dd47
parentb8d6e05f16b77231d11b96659072b302290b3396 (diff)
downloadqemu-32ee080ccdde8a90d5ee3b56e28f95ada35dee4c.zip
qemu-32ee080ccdde8a90d5ee3b56e28f95ada35dee4c.tar.gz
qemu-32ee080ccdde8a90d5ee3b56e28f95ada35dee4c.tar.bz2
docs/devel/style: Mention alloca() family API is forbidden
Suggested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20250901132626.28639-4-philmd@linaro.org>
-rw-r--r--docs/devel/style.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/devel/style.rst b/docs/devel/style.rst
index d025933..941fe14 100644
--- a/docs/devel/style.rst
+++ b/docs/devel/style.rst
@@ -446,8 +446,8 @@ Low level memory management
===========================
Use of the ``malloc/free/realloc/calloc/valloc/memalign/posix_memalign``
-APIs is not allowed in the QEMU codebase. Instead of these routines,
-use the GLib memory allocation routines
+or ``alloca/g_alloca/g_newa/g_newa0`` APIs is not allowed in the QEMU codebase.
+Instead of these routines, use the GLib memory allocation routines
``g_malloc/g_malloc0/g_new/g_new0/g_realloc/g_free``
or QEMU's ``qemu_memalign/qemu_blockalign/qemu_vfree`` APIs.