__attribute__((malloc))

Specifies that the pointers returned by a function will not point to objects that are already referred to by other variables.

Syntax
  function-declaration __attribute__((malloc));  
  function-definition __attribute__((malloc));  
Remarks

This attribute specification gives the compiler extra knowledge about pointer aliasing so that it can apply stronger optimizations to the object code it generates.