Some reader favorites:
EJB fundamentals and session beans
Create a scrollable virtual desktop in Swing
Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API
The Java automatic garbage collection process typically operates as a low-priority thread that constantly searches memory for unreachable objects, objects not referenced by any other object reachable by a live thread. Different JVMs use different algorithms to determine how to collect garbage most efficiently.
In the JVM, memory is allocated in two regions:
new keyword are allocated. Since local variables are few in number, only primitive types and references, usually the stack will
not overflow, except in cases of unusually deep or infinite recursion. 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. The JVM cannot allocate more objects if the heap is
full of live objects and unable to expand further.
The four typical causes of memory leaks in a Java program are:
Some approaches to detecting memory leaks follow in the list below:
totalMemory() and freeMemory() methods in the Java runtime class, which shows how much total heap memory is being controlled by the JVM, along with how
much is not in use at a particular time. This mechanism can provide the heap's memory utilization. However, details of the
heap utilization indicating the objects in the heap are not shown.
In the subsequent sections, I analyze some causes of memory leaks in enterprise Java applications using a sample application and a memory profiling tool. I also suggest strategies for detecting and plugging such leaks in your own projects.
| Subject | Replies |
Last post
|
|
By chivukkirkadpa |
0 |
07/24/07 02:32 PM
by chivukkirkadpa |
|
By JavaWorld
|
1 |
10/05/06 10:00 AM
by Anonymous |
|
By exabyte |
0 |
10/05/06 03:50 AM
by Anonymous |
|
By Biagio |
0 |
10/04/06 07:24 AM
by Anonymous |
|
By Erneast |
0 |
10/04/06 07:23 AM
by Anonymous |
|
By Anonymous |
0 |
10/04/06 07:22 AM
by Anonymous |
Free Download - 5 Minute Product Review. When slow equals Off: Manage the complexity of Web applications - Symphoniq
![]()
Free Download - 5 Minute Product Review. Realize the benefits of real user monitoring in less than an hour. - Symphoniq