On Sunday April 12 2009, Christian Vest Hansen wrote:
> On Sun, Apr 12, 2009 at 5:57 PM, Robert Fischer
>
> <robert.fisc...@smokejumperit.com> wrote:
> > Is the max number of stack frames stored somewhere?
>
> I don't *think* it is possible to say for sure what the number is.
> Going from memory, the stack area of the memory used by the JVM has
> an upper bound in bytes controlled by -Xss, and this area is shared
> among all threads, and different stack frames may take up a different
> amount of memory.

The value given for -Xss (or its default) establishes a per-thread 
limit, not JVM-wide shared limit. For all threads to share stack space, 
the stack would have to be a linked structure, not a contiguous region.

As you say, each stack frame's size is not fixed, but depends on the 
arguments and local variables declared by the method invoked.

So the conclusion—that it is not possible to state or compute a number 
of stack frames available—is true.


Incidentally, I can't think of a reason, offhand, that a linked stack 
could not be used in a JVM implementation, but my knowledge of the JVM 
spec and pertinent implementation techniques is minimal.


Randall Schulz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com
To unsubscribe from this group, send email to 
jvm-languages+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to