9.36 __attribute__((malloc)) function attribute

This function attribute indicates that the function can be treated like malloc and the compiler can perform the associated optimizations.

Note

This function attribute is a GNU compiler extension that the ARM compiler supports.

Example

void * foo(int b) __attribute__((malloc));
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.