--- old/src/share/vm/runtime/os.hpp 2016-06-03 17:56:01.329354600 -0700 +++ new/src/share/vm/runtime/os.hpp 2016-06-03 17:56:01.026289400 -0700 @@ -154,6 +154,7 @@ static void get_summary_cpu_info(char* buf, size_t buflen); static void get_summary_os_info(char* buf, size_t buflen); + static int create_tmpfile(const char* dir, size_t size, bool exec); public: static void init(void); // Called before command line parsing static void init_before_ergo(void); // Called after command line parsing @@ -311,6 +312,10 @@ size_t alignment_hint, MEMFLAGS flags); static char* reserve_memory_aligned(size_t size, size_t alignment); static char* attempt_reserve_memory_at(size_t bytes, char* addr); + + // Map the given address range to a temporary file created at the specified directory. + // The address range must already be reserved for guaranteed success. If it not reserved, their could be an error while mapping leading to JVM shutdown + static bool map_memory_to_file(char* base, size_t size, const char* backing_filename); static void split_reserved_memory(char *base, size_t size, size_t split, bool realloc); static bool commit_memory(char* addr, size_t bytes, bool executable);