• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Memory Leakage!

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is Memory Leakage and Stack means?
Thanks
Angela
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Memory leaks, in the classic sense, don't (shouldn't, rather) occur in Java, since you have no direct way to allocate and (forget to) deallocate memory. There are ways (as always) you can get close though, see Dobb's.
To understand stacks, insofar as they apply to Java, refer to Chapter 3 of the VM Specificaion.
You may also want to pick up a good general science book on compilers or spend some time with a good C/++ book. At the end of the day, it's all the same, just different faces.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well for memory leakage u must have got the answer. as far as stacks are concerned I'll tell u. Stacks are data structures i.e. they have ability 2 store data. They r typical in the sense that u can only add data to the top of the pile. Say it's like a pile of bricks in which u can only remove or add bricks from the top. u can't operate on it in somewhere middle or bottom but u r allowed operations only on the top of the stack. this is also termed as tos(stands for top of the stack). 2 terms typical to it r push & pop. push is adding element 2 the top of the list & pop is removing element from the top of the stack. in java we've the implementation of stack as a class & is available in collections framework.
hope I made my point clear. all the best
 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it now. Thanks to all.
Angela

Originally posted by jatin rai:
well for memory leakage u must have got the answer. as far as stacks are concerned I'll tell u. Stacks are data structures i.e. they have ability 2 store data. They r typical in the sense that u can only add data to the top of the pile. Say it's like a pile of bricks in which u can only remove or add bricks from the top. u can't operate on it in somewhere middle or bottom but u r allowed operations only on the top of the stack. this is also termed as tos(stands for top of the stack). 2 terms typical to it r push & pop. push is adding element 2 the top of the list & pop is removing element from the top of the stack. in java we've the implementation of stack as a class & is available in collections framework.
hope I made my point clear. all the best


 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read the link site. I still don't understand the difference between role of stack and heap in JVM
Please do let me know,
Thanks
Angela
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I recall correctly, the stack is used to keep track of stuff between function calls (every new function call has its parameters pushed on to the stack and popped off by the called function). The heap however is what is used to allocate new memory for data structures. I hope this helps and is correct.
 
reply
    Bookmark Topic Watch Topic
  • New Topic