The C side of the VM and the stack space. Some things (like native threads) use C side for things.

if you run with -server, you almost always want to reduce the stack (which is allocated on a per thread basis) -Xss or -XX:ThreadStackSize (on solaris you use that to set a lower one and the -Xss to support a larger one). The default with -server is usually 512k per thread which is really pretty excessive (and with large heaps causes "cannot create native thread" and a lot of strange OOME.

Hendrik Schreiber wrote:

The whole VM needs more memory than just the heap:

- the vm itself, native libraries etc
- the permanent space, which is usually not counted as heap
- compiled Java code (by the JIT)
- anything I forgot?

-hendrik


On Apr 15, 2005, at 12:20, Ed Burnette wrote:

If you run recent builds of Eclipse 3.1with the -debug option it will add a little memory usage window in the status bar, like this:

<image.tiff>This says it's using 33M out of an available 48M of memory. The code (in HeapStatus.java) just uses the Runtime.totalMemory() and Runtime.freeMemory() methods to get these numbers.

Now the problem is that Windows Task Manager and Sysinternals Process Explorer both agree that the java.exe process is using 115M of VM space (136M peak), and 78M of working set space (105M peak). 67M (115-48) is unaccounted for.

So I tried a different workspace. There I see:

<image.tiff>(132M used out of 180M), but Windows thinks the process is using 343M of VM space (345M peak) and 312M of working set space (316M peak). 163M (343-180) is unaccounted for.

How do I find out who's using all that memory and reduce it? I'm using Sun JDK5.0.2 on WinXPsp2.

<memory.png><mem2.png>_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org



_______________________________________________ Juglist mailing list [email protected] http://trijug.org/mailman/listinfo/juglist_trijug.org .



_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to