Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to increase a java process's(when is running) size?

I have a very important process running. I can not stop it and need to enlarge the java process' size! Is there any way to increase my java process' size online(at runtime)?

like image 662
hossein shemshadi Avatar asked Dec 31 '14 08:12

hossein shemshadi


1 Answers

You can increase the following during a running process.

  • number of threads
  • amount of memory used by the stack (but the maximum size of an individual stack)
  • amount of native memory used
  • amount of memory mapped files mapped into memory
  • shared libraries.

But what you can't do is increase the maximum heap size. This is what a maximum means. More technically it is because the entire heap must be a single continuous region of memory and increasing the limit wouldn't help.

like image 192
Peter Lawrey Avatar answered Oct 01 '22 18:10

Peter Lawrey