question about malloc attribute

Prathamesh Kulkarni prathamesh.kulkarni@linaro.org
Fri May 5 14:21:00 GMT 2017


Hi,
I was wondering what constraints apply to function that is annotated
with malloc attribute ?
For instance is the function allowed to modify global data ?
As far as I understand, from the doc a function could be annotated
with malloc attribute if it returns a pointer to a newly allocated
memory block (uninitialized or zeroed) and the pointer does not alias
any other valid pointer ?

Thanks,
Prathamesh



More information about the Gcc-help mailing list