How come nobody pointed to the JVM Spec?

Apologize for not knowing where the "usual channels" are to unlock this thread so the hearing of technical facts can continue.
From the [JVM spec 3.6|http://java.sun.com/docs/books/jvms/second_edition/html/Overview.doc.html#17257] third paragraph:
"The sizes of the local variable array and the operand stack are *determined at compile time* and are supplied along with the code for the method associated with the frame (4.7.3). Thus the size of the frame data structure depends only on the implementation of the Java virtual machine, and the *memory for these structures can be allocated simultaneously on method invocation*." (emphasis mine)
The two principals in the locked thread both have support in the JVM spec- local variables are allocated statically at compile time but the actual physical memory for them is allocated dynamically at runtime. Am I understanding that paragraph correctly?

pete_d wrote:
jverd wrote:
The closest Java comes to C++'s #1 static memory allocation is String literals. The compiler stores them in the .class file, and the "address" (the reference value) of the String objects remains the same throughout program execution, as far as I know. Granted, what's in the .class file still has to get allocated on the heap when the class loads--unless it's already there--but if you view that as an implementation detail, and squint real hard, and maybe hit yourself on the head with a hammer, you could almost imagine that String constants are "statically allocated."I'm sensing that the JVM has a very different architecture than a ordinary computer and thus the problem with the regular definitions.I don't see that.
First it isn't that different. There isn't anything special about the VM. Interpreters existed before Java and have continued to exist. I am pretty sure interpreters existed at least in the 70s. Perl at least up until 6 was based on an intermediate form. You could actually save the intermediate form and run that rather than the 'normal' way of executing the perl script every time.
Second one still needs to look at what is going on in terms of something resembling standard definitions.
If one wishes to restrict oneself to the Java language itself, then regardless of the implementation details of the compiler it doesn't "allocate" anything. Because until the code runs there is no allocation.
If one wishes to include the VM specification (rather than implementation) then one can note that there is nothing specifically that indicates any static allocation either and certainly nothing that the compiler controls.
Consider a bytecode - istore, which takes an index. It stores into the position defined by the index. This is an instruction created by the compiler. The instruction itself does not suggest allocation. A direction to store is not a direction to allocate. The instruction presumes the allocation has already been done.
Consider a method call defined in the following.
        // Basic java code
        test(1);
        static int test(int i){ return i; }
        //byte codes for call
       0:   iconst_1
       1:   invokestatic    #2; //Method test:(I)V
       // byte codes for method
       public static int test(int);
       0:   iload_0
       1:   ireturnThe above represent byte codes emitted by the compiler. I see nothing that suggests allocation. Again at that point the compiler assumes that the stack frame exists.
Consider the class file structure which is generated by the compiler. From that the code_attribute defines code and it has the max_stack is nothing but a 16 int.
It is just a size. One needs the size to do the allocation but the size is not the allocation.
In terms of the above and what the compiler does it assumes that something will do correct allocations based on the data that it provides. Still isn't the same as doing the allocation.

Similar Messages

  • How come when i press the sleep on my MBP it auto shut down?

    How come when i press the sleep on my MBP it auto shut down?

    Pressing the Power Button brings up a dialog: "Restart Sleep Cancel Shut down (default button).
    Teddy Mack; are you just giving the Power Button a light touch, or holding it down?

  • HT201322 How come i cant see the hide buttom in my iphone?

    How come i cant see the hide buttom in my iphone?
    i swipe the item again and again, but nothing comes out, just cant see the hide button......the instuction works in itunes, but in iphone

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                             
    - Restore to factory settings/new iOS device.

  • How come I cannot download the trial version?

    How come I cannot download the trial version? The creative cloud window pops up with nothing in it and nothing happens.

    Did you download the Creative Cloud management app, install that and then use it to download the AI app?

  • HT4060 I have my iPad plugged into the wall, how come its not charging the battery?

    How come my battery is not charging even though the iPad is plugged in?

    The possible reasons could be....
    1. Bad connector cable
    2. Faulty power adapter/charger
    3. Problem with the wall socket
    4. Faulty dock connector opening
    5. Something impeding the charge getting through - debris in the connector end of the iPad
    6. Faulty iPad/corrupt software
    Try another cable, another power adapter, another wall socket, and go from there. Nobody can just guess what the reason is, start eliminating some of the possible causes and go from there.

  • How come inspection points with DESTRUCTIVE MICs don't affect sample size?

    Hi guys,
    i have a case i tried on IDES and i need an explanation for it if you can.
    @ the beginning we have an in-process inspection with inspection points and non-destructive MICs, the interval of 10 mins (of the inspection point) generated 3 inspections, and my sampling procedure led to a sample size of 1 PC, in the inspection lot display the sample size is "1", which is normal and i understand this.
    here comes the problem
    we will change one of the MICs and make it destructive. Now we have our 3 inspections. The normal logic says that I'm having 3 inspections and there is on of the MICs DESTRUCTIVE, therefore I'm must get 3 samples, one for each inspection, which means that when we check the sample size in the inspection lot we must get a size of 3, but when i tried this i got a size of 1 again....and this is not logical because my sample will be destructed in the first inspection so how can I carry on the remaining 2 inspections ???
    so i need to know how come I'm getting a size of 1 and is that right or wrong ???
    i hope i made it clear and wish you can help
    Regards,
    Mahmoud Osama

    Hi Amol,
    i'm sorry i don't understand what do you mean by operation confirmation quality  ???
    and about stock posting, i know as you said that it is not possible with in-process inspection, as the lot is not stock relevant, but whether it is stock relevant or not has nothing to do with the sample size calculation, my problem is that the logic says that i must get 3 samples because with each inspection i'll destruct my sample, but SAP calculations give only one sample !!!!
    i hope you can help with that, thanks for you concern.
    Regards,
    Mahmoud Osama

  • How do I point to the iTunes file that lists purchase history?

    My iTunes library got messed up and I've been able to point back to most of my settings but do I point to the iTunes file that lists purchase history? Perhaps I'm pointing to an old iTunes library by mistake?

    also, you could use this script: _*Track Down Purchases*_.
    This script will examine each track in a selection of tracks or a selected playlist to determine if it was purchased from the iTunes Store and then copies it to a discrete playlist named for the person who purchased it, eg: "Steve Ballmer's Purchased Music". Recognizes song, video, and audiobook purchases. Purchaser information is gleaned by examining the track's file, which, depending on file location and access speed, can take as long a second per track. Just sayin'.
    JGG

  • How to subtract points if the user clicks outside a clickbox

    Is there a way to subtract points if the user clicks outside
    a clickbox? I only see options to jump between slides but no
    options to manage grade points.
    Thanks
    Elías

    Hi Andrew, thanks for your reply.
    There is a case where the user will get 0 points and that is
    if a click outside the box leads to a new slide or makes the slide
    continue. Otherwise, if the user has infinite attempts until he/she
    gets it right, captivate will not track hoy many attempts the user
    took. For Captivate, it will be 100% accuracy results. I cant let
    the slide continue unless there is a right click because, if I
    select the continue option, the user will never know what was the
    option he should have taken as there is no explanation of it.
    I then ask you: is there a way to tell the user he clicked in
    the wrong place and show him where he should have clicked, as
    additional information that couldnt interfere with the timeline of
    the proyect. Or is there a way to track negative points or
    attempts.
    Hope I made it clear,
    Elías

  • How do i point to the Unix category?

    All I can do is point to OS X Technologies forum/discussion/community or whatever these are called, but can't direct anyone straight to the Unix or AppleScript category. This needs fixing or some direction on how to do this.

    baltwo wrote:
    All I can do is point to OS X Technologies forum/discussion/community or whatever these are called, but can't direct anyone straight to the Unix or AppleScript category. This needs fixing or some direction on how to do this.
    Hi baltwo-  this is like the blind leading the blind. You have to click on the category box:
    and you end up with this:
    https://discussions.apple.com/community/mac_os/mac_os_x_technologies?view=all#/? tagSet=1048

  • Airport Extreme Compatible Printers - How can you tell by the printer spec?

    Hi,
    If a printer spec says Mac OS X v10.3.9, 10.4 compatible am I safe in assuming it has drivers for Airport Extreme? If not how can I be sure? I'm trying to replace an old printer that doesn't work very well or have drivers specifically for the Airport Extreme.
    My OS is Tiger.

    There are no drivers specifically for A-Extreme. You should refer to this list:
    http://www.ifelix.co.uk/tech/1013.html

  • MacBookPro is a desktop replacement. How come no superdrive in the retina display version? ?

    I've been waiting for the MacBook Pro with Retina Display to arrive. Now I have NO SUPERDIVE? MacBook Pro is supposed to be a  a Desktop Replacement, the closest thing to a desktop you can get in a laptop, no? So, how can you justify taking out the superdrive to save a lousy 1.1 lbs.? Apple already has ultrathin and cloud computer machines. We musicians and travelers need something that plays and burns DVD/CD and I was hoping, with the new generation and the hi-res screen, BluRay. Instead, I get a crippled machine, or a machine that i have to use with a 10", 1 lb dongle (the superdrive) that won't fit on an airplane table. Will somebody please explain the design philosophy? I'm going to have to mutilate my machine by super gluing the outboard drive to the top half of my machine to get it to fit on an airplane table!! This is absolutely the dumbest decision Apple management has made in long time!!

    I agree, it's much thinner, and that's nice. My point though, is that they already have thinner versions without optical capability. If the MBP is supposed to be a 'desktop replacement,' it ought to choose completeness over stylishness. Those who want thinner and lighter and cloud based and stylish can get it in other models. But hey,, no harm in a thin MBP without an optical drive for those who want it, just put a Retina display on a superdrive version for those who want that too. Different strokes. They still have the older chassis in producion. Can't a Retina display be adapted to that? That's really all I'm asking.

  • How come my contribution for the translation is visible only when I'm connected?

    I contribute to the wiki today by translating this page (http://support.mozilla.com/fr/kb/What+is+Firefox+Sync) to french. I see it's not translated and need translation when I'm not connected, but as soon as I'm connected, I can see the page in french

    Moving this to the contributors forum.
    Your article is in the staging area, and needs to be reviewed before it can be visible to people not logged in.
    See [[How we are different]]

  • How come nobody can log in to a user account?

    10.6 Server functioning well in all configured aspects. Did a software update. I don't think it was an important one, perhaps Safari and iTunes which I did just because I always do all the updates. Then, I used Disk Utility to repair permissions. Again, just because some say that you should, and it has never caused me any problems.
    Instant disaster! Now nobody can log in to a user account to access any network home folders. All users can log in and access the Wiki service as normal. And I can log in via ARD and use Server Admin and Workgroup Manager. But no luck with users accessing the homes.
    I suspect inappropriate permissions at or near the top of my Users directory, but I am not sure. First of all, what may have happened, and then how can I solve this problem???

    I have no idea what may have happened (surely nothing SHOULD have), and I'm pretty much a novice (especially with NetBoot), but did you check in...
    - Workgroup Manager: User/'Basic' tab/"User can" access account
    - Server Admin: NetBoot (and NFS or Web) is running
    To check permissions 'at or near the top of the Users directory', use ServerAdmin/AFP/Sharepoints/Browse then click on the permissions tab and double-click the user/group name. Or select the user/group and click the gear icon below for more ways to cause trouble!
    Apologies if you knew all this already.

  • How come I cannot see the meeting response tab at the bottom in Calendar

    Hi, my company uses Microsoft Exchange 2007. Let say someone invited me to an event. I accepted the event either on the phone or Outlook. In Outlook, it clearly showed that I had accepted the event, and also provided me with the options to change my response (like tentative or deny). When I clicked on the same event on my iPhone, it didn't give me those options (accept, deny, tentative). It gave me the option to delete the event, as if I was the event organizer. I checked the same event on my iPad 2 running iOS 5.0.1 and the same thing happened.
    On my Android device, I was able to change my response to the meeting just like how it was supposed to be. Could this be a bug with the iOS Mail application?
    I think it might have something to do with changing the initial event date or time and sending updates. Somewhere along the way, it's not syncing up correctly.

    Hi There,
    Can you please check Windows>Effects
    Select any Caption and at the bottom left you have Efftects. Check the screenshot.
    Thanks
    PRiyank

  • I have just down loaded a movie on my itune using my new ipad. i have also bought and apple tv how come i cant play the movie from my ipad through the apple tv? i tried syncing the ipad to my comp and playing the movie that way but once in my itunes no mo

    I've downloaded a movie on my ipad and I've hooked up my apple tv.  Why can't i whatch the movie from my ipad through my apple tv?  I tried synching my ipad to see if, when synched, I would see the movie on my computer in itunes.  No luck there.  What am I doing wrong?  Why is it showing in my itunes on my ipad but the movie has disappeared when I look at my itunes on my computer so that I can watch it via Apple TV?

    If you rented it directly on the Apple TV then you can't transfer it off and you have it watch it on that - from http://support.apple.com/kb/HT1415 :
    You can move the rental between devices as many times as you wish during the rental period. However, the movie can only be played on one device at a time. If you rent a movie on an iPhone, iPad, iPod touch, or Apple TV, it is not transferable to any other device and you must watch it on that device.

Maybe you are looking for

  • How do I use the NI 9481 to switch a load on for 30s and off for 30s?

    I am attempting to turn a load on and monitor voltages using Signal Express and a cDAQ. I have a NI 9481 Relay module but I am having a problem figuring out how to set it up. I need to have the relay close for 30 seconds and open for 30 seconds.

  • Satellite L300 Windows 7 back to Vista with Toshiba Recovery CDs

    Hello all, I have a Toshiba Satellite Series L300 (2008 model) laptop which originally had Vista but I installed Windows 7 Professional on it. I now wish to return back to Vista. I noted that the 'Windows.old' folder created on the C:/ drive seems to

  • If I don't install lion will I be cloud less next june

    I am not planning on installing lion.  On reason is iTunes 10.  I don't like it, the only reason I have it installed is to update my iPhone.  I use iTunes 9 for everything else.  iTunes is colorless and it sounds like finder is also.  If I don't upgr

  • FD11 - Open item balance

    Hi Friends, When i am using FD11 for a specific customer  amount in account balance tab  is equal to OI net tab.  The same balance is equal to open item balance FBL5N. But for some customers amount account balance  tab(in T.Code:FD11) is not equal to

  • Sending DME file to Bank  ways ???

    Hi  Gurus Please let me know the different ways of sending the DME file to the bank. Different ways and its set ups.. clearly explain somebody. How to set up the file path .. so that DME file will be sent automatically exported. Bank and SAP how do t