Browse Source

define malloc attribute

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
2220e1a676
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/include/compiler.h

+ 6
- 0
src/include/compiler.h View File

@@ -298,6 +298,12 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
298 298
  */
299 299
 #define __nonnull __attribute__ (( nonnull ))
300 300
 
301
+/**
302
+ * Declare a pointer returned by a function as a unique memory address
303
+ * as returned by malloc-type functions.
304
+ */
305
+#define __malloc __attribute__ (( malloc ))
306
+
301 307
 /**
302 308
  * Declare a function as used.
303 309
  *

Loading…
Cancel
Save