Merge
authorjmasa
Tue, 03 Jan 2012 10:22:19 -0800
changeset 11404 342585defc9f
parent 11401 f7b9bc7cf623 (current diff)
parent 11403 2a7f52ac7ce3 (diff)
child 11413 4f0c241f5aad
child 11415 45289591641a
Merge
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp	Tue Jan 03 10:22:19 2012 -0800
@@ -2835,7 +2835,7 @@
 #endif
 }
 
-void os::free_memory(char *addr, size_t bytes) {
+void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) {
   ::madvise(addr, bytes, MADV_DONTNEED);
 }
 
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Tue Jan 03 10:22:19 2012 -0800
@@ -2546,8 +2546,8 @@
   }
 }
 
-void os::free_memory(char *addr, size_t bytes) {
-  commit_memory(addr, bytes, false);
+void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) {
+  commit_memory(addr, bytes, alignment_hint, false);
 }
 
 void os::numa_make_global(char *addr, size_t bytes) {
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Tue Jan 03 10:22:19 2012 -0800
@@ -2821,7 +2821,7 @@
 }
 
 // Uncommit the pages in a specified region.
-void os::free_memory(char* addr, size_t bytes) {
+void os::free_memory(char* addr, size_t bytes, size_t alignment_hint) {
   if (madvise(addr, bytes, MADV_FREE) < 0) {
     debug_only(warning("MADV_FREE failed."));
     return;
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Tue Jan 03 10:22:19 2012 -0800
@@ -3130,7 +3130,7 @@
 }
 
 void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { }
-void os::free_memory(char *addr, size_t bytes)         { }
+void os::free_memory(char *addr, size_t bytes, size_t alignment_hint)    { }
 void os::numa_make_global(char *addr, size_t bytes)    { }
 void os::numa_make_local(char *addr, size_t bytes, int lgrp_hint)    { }
 bool os::numa_topology_changed()                       { return false; }
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Jan 03 10:22:19 2012 -0800
@@ -726,12 +726,8 @@
 }
 
 ConcurrentMark::~ConcurrentMark() {
-  for (int i = 0; i < (int) _max_task_num; ++i) {
-    delete _task_queues->queue(i);
-    delete _tasks[i];
-  }
-  delete _task_queues;
-  FREE_C_HEAP_ARRAY(CMTask*, _max_task_num);
+  // The ConcurrentMark instance is never freed.
+  ShouldNotReachHere();
 }
 
 // This closure is used to mark refs into the g1 generation
--- a/hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp	Tue Jan 03 10:22:19 2012 -0800
@@ -282,7 +282,7 @@
     // large page can be broken down if we require small pages.
     os::realign_memory((char*)aligned_region.start(), aligned_region.byte_size(), page_size());
     // Then we uncommit the pages in the range.
-    os::free_memory((char*)aligned_region.start(), aligned_region.byte_size());
+    os::free_memory((char*)aligned_region.start(), aligned_region.byte_size(), page_size());
     // And make them local/first-touch biased.
     os::numa_make_local((char*)aligned_region.start(), aligned_region.byte_size(), lgrp_id);
   }
@@ -297,7 +297,7 @@
     assert((intptr_t)aligned_region.start()     % page_size() == 0 &&
            (intptr_t)aligned_region.byte_size() % page_size() == 0, "Bad alignment");
     assert(region().contains(aligned_region), "Sanity");
-    os::free_memory((char*)aligned_region.start(), aligned_region.byte_size());
+    os::free_memory((char*)aligned_region.start(), aligned_region.byte_size(), page_size());
   }
 }
 
@@ -954,7 +954,7 @@
     if (e != scan_end) {
       if ((page_expected.size != page_size || page_expected.lgrp_id != lgrp_id())
           && page_expected.size != 0) {
-        os::free_memory(s, pointer_delta(e, s, sizeof(char)));
+        os::free_memory(s, pointer_delta(e, s, sizeof(char)), page_size);
       }
       page_expected = page_found;
     }
--- a/hotspot/src/share/vm/gc_implementation/shared/mutableSpace.cpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/share/vm/gc_implementation/shared/mutableSpace.cpp	Tue Jan 03 10:22:19 2012 -0800
@@ -51,7 +51,7 @@
       size_t size = pointer_delta(end, start, sizeof(char));
       if (clear_space) {
         // Prefer page reallocation to migration.
-        os::free_memory((char*)start, size);
+        os::free_memory((char*)start, size, page_size);
       }
       os::numa_make_global((char*)start, size);
     }
--- a/hotspot/src/share/vm/runtime/os.hpp	Thu Dec 29 20:09:24 2011 -0500
+++ b/hotspot/src/share/vm/runtime/os.hpp	Tue Jan 03 10:22:19 2012 -0800
@@ -256,7 +256,7 @@
                              char *addr, size_t bytes, bool read_only,
                              bool allow_exec);
   static bool   unmap_memory(char *addr, size_t bytes);
-  static void   free_memory(char *addr, size_t bytes);
+  static void   free_memory(char *addr, size_t bytes, size_t alignment_hint);
   static void   realign_memory(char *addr, size_t bytes, size_t alignment_hint);
 
   // NUMA-specific interface