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 Use .section .rodata instead of .rodata on FreeBSD 2023-02-24 16:45:48 -08:00
rpc Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
sys powerpc64: Support ELFv2 asm on Big Endian 2023-04-27 12:49:21 -07:00
Makefile.am Add SHA2 SIMD feature tests for libspl 2023-03-02 13:52:15 -08:00
assert.h Reduce false positives from Static Analyzers 2022-09-30 15:30:12 -07:00
atomic.h Add membar_sync 2022-09-20 15:32:44 -07:00
libgen.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libshare.h Make zfs-share service resilient to stale exports 2022-09-09 10:54:16 -07:00
statcommon.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
stdlib.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
string.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
umem.h Use __attribute__((malloc)) on memory allocation functions 2023-05-26 15:47:52 -07:00
unistd.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zone.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00