This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have configured JamVm 1.5.3 & GNU Classpath 0.88.
Deployed web application with Jetty container, Allocated 12MB as Maximum heap size
Now, When I go through the application, JamVm heap grows, but never seen a memory goes down or releasing memory to OS as garbage collector runs
(Even garbage collection explicit execution provided on each n request from container)
Application gets out of the memory if accessing pages, As heap goes on and on ...
Sidh Shah wrote: but never seen a memory goes down or releasing memory to OS as garbage collector runs
I don't think the JVM ever releases memory back to the OS, and 12MB is a really small amount of memory to give to a program. The default used to be 64MB (now it is more).
If you want to monitor the internal memory state, the JDK includes JConsole, which can do that.
If you are getting an OutOfMemoryError, we have a page of helpful starting points.
Joined: Jul 11, 2007
Thanks for the reply.
This is for embedded environment , I can afford only 12MB of heap memory to give web application
As heap is used only for container and web application running, Few configuration data managed by application
and VM's own requirement on resources is not considered in given heap.
For JamVm, I have observed , It executes Garbage Collector when almost few KBs memory left in heap.
And parallel execution of tasks will cause out of Memory while VM try to free memory
I am not getting, if memory is not used by VM, Why it keeps, As on platform other daemons and applications are running
I think explicitly execute GC in low memory systems is not desirable , which is costly in terms on cpu and memory both ?