summaryrefslogtreecommitdiffstats
path: root/src/include/compiler.h
diff options
context:
space:
mode:
authorHolger Lubitz2007-08-20 20:28:11 +0200
committerHolger Lubitz2007-08-20 20:28:11 +0200
commit2220e1a676fd46286f48aa193d70fe5197629f49 (patch)
tree2f6f07dbcb19d0a4f18a6f4bcc35240d6fc3ea0a /src/include/compiler.h
parentstrdup and strndup call malloc and are not pure (diff)
downloadipxe-2220e1a676fd46286f48aa193d70fe5197629f49.tar.gz
ipxe-2220e1a676fd46286f48aa193d70fe5197629f49.tar.xz
ipxe-2220e1a676fd46286f48aa193d70fe5197629f49.zip
define malloc attribute
Diffstat (limited to 'src/include/compiler.h')
-rw-r--r--src/include/compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h
index 32416a56..15efb709 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -299,6 +299,12 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
#define __nonnull __attribute__ (( nonnull ))
/**
+ * Declare a pointer returned by a function as a unique memory address
+ * as returned by malloc-type functions.
+ */
+#define __malloc __attribute__ (( malloc ))
+
+/**
* Declare a function as used.
*
* Necessary only if the function is called only from assembler code.