mirror_zfs/lib/libspl/include
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
..
os
rpc
sys
assert.h
atomic.h
libgen.h
libshare.h
Makefile.am
statcommon.h
stdlib.h
string.h
umem.h Use __attribute__((malloc)) on memory allocation functions 2023-05-26 15:47:52 -07:00
unistd.h
zone.h