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 clang to allocate local variables on the heap not the default stack (auto free them before return)?
Since I want to migrate many synchronous codes (currently) into asynchronous implementation by hooking the blocking syscalls for concurrency and performance by using C coroutine (copy stack). The split-stack is fine but it is not mature (from aspects of performance and customizability). And the standalone stack for each coroutine would also cost too much.
Thanks a lot.