Results 1 to 4 of 4
Thread: Memory Allocation
- 09-19-2009, 06:53 AM #1
- 09-19-2009, 07:12 AM #2
- 09-19-2009, 07:19 AM #3
thanks for ur reply.....
but my question is how the memory allocation of variable "v" will be, from begining of code to the ending during execution?
- 09-19-2009, 05:47 PM #4
First off, the compiler does not output the result of the statements. It converts the statements to bytecode as mentioned by kishan. Memory allocation is done by the JVM at run-time. Before runtime, no memory is allocated at all.
During runtime, the JVM will set aside 32 bits of space to store v, then assign a value to that space (5), replace that value with the sum of v and 5. result of v+5 is stored in a temporary location before overwriting v itself.
- By jyothi.priyanka in forum New To JavaReplies: 0Last Post: 04-04-2009, 01:25 PM
- By manibhat in forum Advanced JavaReplies: 2Last Post: 08-21-2008, 07:33 PM
- By mew in forum New To JavaReplies: 1Last Post: 01-20-2008, 09:55 AM
- By mew in forum CLDC and MIDPReplies: 0Last Post: 12-28-2007, 12:02 PM
- By sathish_2111 in forum NetworkingReplies: 2Last Post: 07-19-2007, 04:29 PM