×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    United Kingdom
    Posts
    49

    Java Stack Size?

    Firstly, does the J2ME JVM have an internal stack for local variables and passing parameters? If so, does anyone know its limits?

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    JVMs store local variables and parameters in "frames" (one frame per method-invokation). Frames can be stored on a stack, or created in a linked-list in the heap, or allocated some other way. The specification only describes the frame-concept; it does not require a particular means of implementation.

    So the answer to your question may vary from phone to phone. (And frankly, you're unlikely to find anyone who'll give you an answer for a specific device, unless someone has found out by experimentation.)

    You can get the JVM specification from Sun's website. (It would be worth getting the CLDC specification also, as that describes how a VM for a phone differs from a "standard" VM). It's worth a look if you're interested in the behind-the-scenes view of things.

    I hope my complete inability to answer your question helps!

    Graham.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •