1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Optimize xmalloc, xcalloc, xrealloc, and xstrdup

Add alloc_size attribute and apply consistently the malloc attribute
to xmalloc, xcalloc, xrealloc, and xstrdup.
This commit is contained in:
Ulrich Drepper
2012-01-08 21:19:43 -05:00
parent aebae0537d
commit ec09c1c410
15 changed files with 86 additions and 44 deletions

View File

@@ -12,4 +12,11 @@ extern void __chk_fail (void) __attribute__ ((__noreturn__));
libc_hidden_proto (__chk_fail)
rtld_hidden_proto (__chk_fail)
#if __GNUC_PREREQ (4,3)
# define __attribute_alloc_size(...) __attribute__ ((alloc_size (__VA_ARGS__)))
#else
# define __attribute_alloc_size(...)
#endif
#endif