wood burning stoves 2.0*
The moose likes Performance and the fly likes Memory Leakage! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Memory Leakage!" Watch "Memory Leakage!" New topic
Author

Memory Leakage!

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
What is Memory Leakage and Stack means?
Thanks
Angela
Yuri Gadow
Greenhorn

Joined: May 08, 2001
Posts: 28
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.
jatin rai
Greenhorn

Joined: Dec 27, 2000
Posts: 11
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

Joined: Nov 27, 2000
Posts: 428
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

Joined: Nov 27, 2000
Posts: 428
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
Micah Kornfield
Greenhorn

Joined: Jul 23, 2001
Posts: 8
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.

God help us if computers ever unite against us<BR>When computers get together to make decisions, they form a Beowulf cluster. When humans get together to make decisions, they form a comittee. Need I say more?<P>-- archnerd on slashdot
 
 
subject: Memory Leakage!
 
Similar Threads
How can I found which class and method has memory leakage?
Memory Leakage
What is Memory Leakage
Memory Leakage
advantage of JDBC drivers over JDBC-ODBC bridge