• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nodes in stack

 
jignesh soni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Sheriff
Pie
Posts: 49367
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Thanks
 
Anurag Blore
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
jignesh soni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic