3.9 __attribute__((malloc)) function attribute

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

Example

void * foo(int b) __attribute__((malloc));
Non-ConfidentialPDF file icon PDF version100067_0609_00_en
Copyright © 2014–2017 Arm Limited (or its affiliates). All rights reserved.