The moose likes Beginning Java and the fly likes nodes in stack Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "nodes in stack" Watch "nodes in stack" New topic

nodes in stack

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
"the stack is a container of nodes"
What is meant by nodes in this statement ? I am confused with term STACK. Where is stack created ? Is it created in procesor or RAM ? Is it created by the programming language or is ot a part of OS ?
Please explain
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38016
Don't know. Please supply more details; where did you read that, what was the general context, etc.

I can think of at least three meaning for "stack" which are related but different from one another.
jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
I am asking about stack in java that a reference is sitto=ing on. Is this stack part of hardware, operating system or is it part of JVM ?
Is there different kinds of stacks ? If yes, can you please inform ablot that

Anurag Blore
Ranch Hand

Joined: Jan 15, 2003
Posts: 74
The RAM memory is logically divided into several categories by the compiler. When we use the stack, we are using the RAM. Stack has direct support from the processor via a stack pointer. Java object references are placed on the stack. The objects themselves remain on the heap.

Heap is a general purpose pool of memory where all Java objects live. It also resides in the RAM. Unlike the stack, the heap doesn’t require the compiler to know the amount of storage it would needs to be allocated in advance. Heap is more flexible than a stack but is also much slower

SCJP 1.2 & 1.5, PMP
jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
Do you mean to say, java compiler creates heap and stack ? If heap and stack are created at run time, then java byte code is run by JVM and not by the compiler. If its not jvm nor java compiler then what compiler creates heap and stack ? Are there any specific areas in RAM where heap and stack are created or are they created at random anywhere in RAM ? If there are more than one applications loaded in the memory , is separate stack created for each application ?
If possible, please explain these things in detail.
subject: nodes in stack
Similar Threads
is it possible to create a object on stack
Unable to get the "children" of an element
How do threads share memory ?
what is the difference??
Urgent - DOM006 Hierarchy request error