search for: freea

Displaying 2 results from an estimated 2 matches for "freea".

Did you mean: free
2019 Jul 13
2
Avoiding alloca elision
...t; memory from the stack frame. The compiler may promote the memory to > registers or (theoretically speaking, we don't do this today) even > demote it to a heap allocation. > What?!? 1) If it gets demoted to a heap allocation, when does the memory ever get freed? There is no "freea" call, after all. 2) What alloca documentation are you looking at, that allows for heap allocation? As far as I know, if the memory can't be stack-allocated, alloca() is just supposed to return NULL... though frankly, as far as I can tell alloca is a nonstandard extension that is implemen...
2019 Jun 29
2
Avoiding alloca elision
Hello I'm implementing stack copying coroutines. It's an interesting challenge. When we use setjmp/longjmp to move between stacks, we must make sure that restoring the stack doesn't blow away the current stack frame before calling longjmp. To do that, we check how big the stack we are restoring is, and use alloca to push the current stack frame beyond that. It works but when I add