Java Runtime.getRuntime().exec() alternatives

前端 未结 6 632
梦谈多话
梦谈多话 2020-11-30 03:50

I have a collection of webapps that are running under tomcat. Tomcat is configured to have as much as 2 GB of memory using the -Xmx argument.

Many of the webapps ne

6条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 04:36

    I think this is a unix fork() issue, the memory requirement comes from they way fork() works -- it first clones the child process image (at whatever size it currently is) then replaces the parent image with the child image. I know on Solaris there is some way to control this behavior, but I don't know offhand what it is.

    Update: This is already explained in From what Linux kernel/libc version is Java Runtime.exec() safe with regards to memory?

提交回复
热议问题