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.


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


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