• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

nodes in stack

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 80749
486
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic