Java memory usage

I can not understand the use of Java memory. I have an application that runs with a maximum amount of memory set to 256M. However, at some point I see that according to the task manager it takes up to 700 MB!

Needless to say, all other applications do not respond a bit when this happens, as they are likely to be replaced.

This is JDK 1.6 on WinXP. Any ideas?

+3
source share
5 answers

A memory configuration is available for the application. It will not include

  • JVM size
  • jars / libs loaded in
  • native libraries and associated dedicated memory

. , - , JVM , 700Mb JVM (- , ..)

+2

, -Xmx, - , .

Java , JVM, , ..

, - , , , , - .

, , 256 . 1 .

, , , Java, . , , . Linux , , Windows.

+2

-Xmx java. , java , ( 2kB, -Xss), PermGenSpace .. , , , , , , , .

, , Windows .

+1

Do you mean a bunch? As far as I know, there are two things to take care of. The Xms option, which sets the initial java heap size, and the Xmx option, which sets the maximum java heap space. If the heap memory intercepts the Xmx value, there must be an OutOfMemoryException.

0
source

How about the virtual pages that it occupies. I think that Windows shows you a complete set of all aggregates.

0
source

Source: https://habr.com/ru/post/1735321/


All Articles