JDK-6850720 : (process) Use clone(CLONE_VM), not fork, on Linux to avoid swap exhaustion
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: unknown
  • Submitted: 2009-06-12
  • Updated: 2010-04-03
  • Resolved: 2009-06-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b62Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
On Linux it is possible to use clone with CLONE_VM, but not CLONE_THREAD,
which is like fork() but much cheaper and avoids swap exhaustion due to momentary
overcommit of swap space.  One has to be very careful in this case to not mutate global
variables such as environ, but it's worth it.

Comments
EVALUATION This fix did not work out on 32-bit Linux, and was reversed in b62 using bug-ID 6853336. For more information and history on this issue, see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6853336 http://mail.openjdk.java.net/pipermail/core-libs-dev/2009-June/001853.html http://sources.redhat.com/bugzilla/show_bug.cgi?id=10311
23-06-2009

EVALUATION this is the implementation of 5049299 for linux
12-06-2009