i have several questions:
- int backtrace(void **buffer, int size); Here buffer is array of pointers. and the array elements on returns points to each frame of stack in return. So, backtrace() internally calls malloc() number of times as that of number of frames? why this is for?
- the above allocated memory is not freed() from backtrace(), So, who release this memory?
- is there any way, to avoid malloc() from inside backtrace()?
- where can i find backtrace() source code?
- how can i write code to backtrace in assembly?