17.2.15 Malloc Function Attribute
The malloc attribute indicates that the function is
malloc-like, in that the pointer it returns will not alias any other pointer that
is live at that time, and additionally that the storage addressed by the pointer
will not contain any pointers to valid objects.
For
example:
void __attribute__ ((malloc)) *custom_malloc (int size_t); This
attribute allows the compiler to improve optimization.