[LLVMdev] Explicitly Freeing Allocas

Nyx mcheva at cs.mcgill.ca
Thu Jun 18 06:48:55 PDT 2009


Hello,

I would just like to ask if it's possible to explicitly free allocas. This
is because I need to call functions that take structs of different sizes as
input, (possibly inside of loops) and I would rather avoid a stack overflow.

If this is not possible, an alternate solution would be for me to allocate
an array of bytes larger than all the struct types I may be using, and cast
that pointer to the right type each type. In that case, I would like to know
how I can find out what the size of a struct is. I've heard of people
talking about using "the right target data", but I have no idea how to
actually do that, and I find the doxygen info doesn't make it any clearer.

Thank you for your help,

- Max
-- 
View this message in context: http://www.nabble.com/Explicitly-Freeing-Allocas-tp24093351p24093351.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list