diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-02 14:20:34 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-02 14:20:34 +0100 |
commit | 53283adb24765a7afb4d6298661c3c1a8d6f5601 (patch) | |
tree | 70fcc968562a53787b3da7de7fe4050732a2cc0c /include/platform.h | |
parent | 8131eea3dce5fba0dfb78e6083d1730423fad20b (diff) | |
download | busybox-w32-53283adb24765a7afb4d6298661c3c1a8d6f5601.tar.gz busybox-w32-53283adb24765a7afb4d6298661c3c1a8d6f5601.tar.bz2 busybox-w32-53283adb24765a7afb4d6298661c3c1a8d6f5601.zip |
include/libbb.h: mark malloc-returning functions with GCC attribute
function old new delta
ash_main 1336 1365 +29
readcmd 1062 1072 +10
add_split_dependencies 707 717 +10
rtnl_talk 539 548 +9
normalize 165 174 +9
xmalloc_optname_optval 583 590 +7
test_main 247 253 +6
insert_bg_job 366 371 +5
dname_enc 391 395 +4
nslookup_main 165 168 +3
ifplugd_main 1099 1102 +3
tftpd_main 493 495 +2
make_new_session 413 415 +2
localcmd 274 276 +2
date_main 696 698 +2
tee_main 317 318 +1
setvar 183 184 +1
hash_find 233 234 +1
xrtnl_dump_filter 400 399 -1
prepend_new_eth_table 297 295 -2
unpack_Z_stream 1229 1226 -3
read_line_input 4823 4820 -3
do_load 523 520 -3
udhcp_run_script 669 665 -4
mkfs_vfat_main 1609 1605 -4
rtnl_rtprot_initialize 70 65 -5
procps_scan 1842 1835 -7
read_opt 873 865 -8
ifupdown_main 2133 2125 -8
mkfs_ext2_main 2492 2482 -10
logread_main 503 492 -11
svlogd_main 1441 1429 -12
rewrite 1032 1018 -14
fbsplash_main 917 903 -14
str2sockaddr 431 405 -26
unpack_lzma_stream 2705 2677 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 18/18 up/down: 106/-163) Total: -57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index 67b04f8cb..54bc27d5b 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -60,6 +60,15 @@ | |||
60 | 60 | ||
61 | #define UNUSED_PARAM __attribute__ ((__unused__)) | 61 | #define UNUSED_PARAM __attribute__ ((__unused__)) |
62 | #define NORETURN __attribute__ ((__noreturn__)) | 62 | #define NORETURN __attribute__ ((__noreturn__)) |
63 | /* "The malloc attribute is used to tell the compiler that a function | ||
64 | * may be treated as if any non-NULL pointer it returns cannot alias | ||
65 | * any other pointer valid when the function returns. This will often | ||
66 | * improve optimization. Standard functions with this property include | ||
67 | * malloc and calloc. realloc-like functions have this property as long | ||
68 | * as the old pointer is never referred to (including comparing it | ||
69 | * to the new pointer) after the function returns a non-NULL value." | ||
70 | */ | ||
71 | #define RETURNS_MALLOC __attribute__ ((malloc)) | ||
63 | #define PACKED __attribute__ ((__packed__)) | 72 | #define PACKED __attribute__ ((__packed__)) |
64 | #define ALIGNED(m) __attribute__ ((__aligned__(m))) | 73 | #define ALIGNED(m) __attribute__ ((__aligned__(m))) |
65 | 74 | ||