zfs/lib/libspl
Richard Yao 0f03a41161
Use __attribute__((malloc)) on memory allocation functions
This informs the C compiler that pointers returned from these functions
do not alias other functions, which allows it to do better code
optimization and should make the compiled code smaller.

References:
https://stackoverflow.com/a/53654773
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute
https://clang.llvm.org/docs/AttributeReference.html#malloc

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14827
2023-05-26 15:47:52 -07:00
..
include Use __attribute__((malloc)) on memory allocation functions 2023-05-26 15:47:52 -07:00
os Introduce kmem_scnprintf() 2022-10-29 13:05:11 -07:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00
assert.c Reduce false positives from Static Analyzers 2022-09-30 15:30:12 -07:00
atomic.c Add membar_sync 2022-09-20 15:32:44 -07:00
getexecname.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libspl_impl.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
list.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
mkdirp.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
page.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
strlcat.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
strlcpy.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
timestamp.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00