Is there a way to tell gcc to allocate local variable on the heap not the default stack?

Remus Clearwater remus.clearwater@gmail.com
Tue May 29 01:27:00 GMT 2018


Hi, for some reason, I want to keep the stack frame usage of some functions
as smaller as possible, but rewrite them by hands is such a pain and very
stupid since they are using many and big local variables currently. And in
these functions they doesn't do anything like longjmp.

So, is there a option to tell gcc to allocate local variable on the heap
not the default stack (auto free them before return)?

Thanks a lot.



More information about the Gcc-help mailing list