-
Enhancement
-
Resolution: Won't Fix
-
P4
-
7u4
-
generic
-
os_x
This bug shadows a JIRA bug created for the Mac OS X port at...
http://java.net/jira/browse/MACOSX_PORT-430
Here is the description from that bug:
Ia simple performance improvement.
os_bsd.cpp has:
static int anon_munmap(char * addr, size_t size) { return ::munmap(addr, size) == 0; }
before the ::munmap() we should add:
int ret = madvise(addr, size, MADV_FREE);
assert(ret == 0, "os::uncommit_memory: madvise failed");
the meaning of MADV_FREE on mac os is:
#define MADV_FREE 5 /* pages unneeded, discard contents */
MADV_FREE Indicates that the application will not need the
information contained in this address range, so the
pages may be reused right away. The address range
will remain valid. This is used with madvise()
system call.
The main difficulty of adding this is to figure out which os variations support madvise and to introduce any necessary conditional compilation.
http://java.net/jira/browse/MACOSX_PORT-430
Here is the description from that bug:
Ia simple performance improvement.
os_bsd.cpp has:
static int anon_munmap(char * addr, size_t size) { return ::munmap(addr, size) == 0; }
before the ::munmap() we should add:
int ret = madvise(addr, size, MADV_FREE);
assert(ret == 0, "os::uncommit_memory: madvise failed");
the meaning of MADV_FREE on mac os is:
#define MADV_FREE 5 /* pages unneeded, discard contents */
MADV_FREE Indicates that the application will not need the
information contained in this address range, so the
pages may be reused right away. The address range
will remain valid. This is used with madvise()
system call.
The main difficulty of adding this is to figure out which os variations support madvise and to introduce any necessary conditional compilation.