Memory Leaks - II
7 September 2008Heap is a place where all objects created with the new keyword are allocated.
Local variables are few in number with only primitive types and references, so usually the stack will not overflow. Some times in special cases like unusually deep or infinite recursion may cause stack overflow. The JVM throws a Java out-of-memory error if it is not able to get more memory in the heap to allocate more Java objects. If heap is full, then the JVM cannot allocate more objects as it is unable to expand further.
The four typical causes of memory leaks in a Java program are:
Unknown or unwanted object references
Long-living (static) objects
Failure to clean up or free native system resources
Bugs in the JDK or third-party libraries
Related Posts:
- Memory Leaks - I
- Java performance Issues (II) - Memory
- Java performance Issues (IV) - Hardware interfacing
- Tunning Eclipse
- Java performance Issues (III) - Garbage collection
- LinkedList - insertion/deletion
- Parsing XML Documents-1 (DOM and SAX)
- Java Data Object (basics)
- Execute An External Program From Java
- Startup time
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Memory Leaks - II