瀏覽代碼

define malloc attribute

tags/v0.9.3
Holger Lubitz 17 年之前
父節點
當前提交
2220e1a676
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. 6
    0
      src/include/compiler.h

+ 6
- 0
src/include/compiler.h 查看文件

@@ -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…
取消
儲存