This discussion is archived
1 Reply Latest reply: Nov 30, 2007 1:07 PM by 843810 RSS

How can I obtain the StackFrame size for a method in Java?

843810 Newbie
Currently Being Moderated
I'm looking to determine (or approximate) the size of the stack frame for a given method (I've got a jmethodid).

The JVM must store this as it is frequently incrementing/decrementing the stack frame pointer during regular execution. I could calculate it (or at least approximate it) by looking at the byte code for a method and adding the size of the parameters and local variables, but there should be an easier way. Any ideas or links to code that does this calculation would be greatly appreciated.