This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimize malloc to stack allocation.


On Wed, 9 Jan 2013, Ondřej Bílka wrote:

gcc currently does not even optimize following fragment:

int foo(){
 char *x=malloc(64);
 free(x);
}

Yes it does. (not that more optimizations aren't possible, but it does this one)

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]