Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
Experts Most Trusted Topic
virtual memory usage from java under linux too much memory used
virtual memory usage from java under linux too much memory used ¬†using -'java,linux,memory,virtual-memory'
I have a problem with a Java application running under Linux.
When I launch the application, using the default maximum heap size (64mb), I see using the tops application that 240 MB of virtual Memory are allocated to the application. ¬†This creates some issues with some other software on the computer, which is relatively resource-limited.
The reserved virtual memory will not be used anyway, as far as I understand, because once we reach the heap limit an OutOfMemoryError is thrown. ¬†I ran the same application under windows and I see that the Virtual Memory size and the Heap size are similar.
Is there anyway that I can configure the Virtual Memory in use for a Java process under Linux?
Edit 1: The problem is not the Heap. ¬†The problem is that if I set a Heap of 128M, for example, still linux allocates 210 MB of Virtual Memory, which is not needed, ever.**
Edit 2: Using ulimit -v allows limiting the amount of virtual memory. ¬†If the size set is below 204 MB, then the application won't run even though it doesn't need 204MB, only 64MB. ¬†So I want to understand why java requires so much virtual memory. ¬†Can this be changed?
Edit 3: There are several other applications running in the system, which is embedded. And the system does have a virtual memory limit. (from comments, important detail)
Sep 24, 2015
to add a comment.
Related Hot Questions
Walkin Jobs Opening
Government Jobs Opening