8200111: MallocArrayAllocator::free should not take a length parameter
authorstefank
Thu, 22 Mar 2018 12:34:31 +0100
changeset 49590 66c32f2a7f10
parent 49487 bde392011cd8
child 49591 272dff61a2de
8200111: MallocArrayAllocator::free should not take a length parameter Reviewed-by: gtriantafill, coleenp, tschatzl
src/hotspot/share/memory/allocation.hpp
src/hotspot/share/memory/allocation.inline.hpp
--- a/src/hotspot/share/memory/allocation.hpp	Thu Mar 22 20:21:19 2018 -0700
+++ b/src/hotspot/share/memory/allocation.hpp	Thu Mar 22 12:34:31 2018 +0100
@@ -549,7 +549,7 @@
   static size_t size_for(size_t length);
 
   static E* allocate(size_t length, MEMFLAGS flags);
-  static void free(E* addr, size_t length);
+  static void free(E* addr);
 };
 
 #endif // SHARE_VM_MEMORY_ALLOCATION_HPP
--- a/src/hotspot/share/memory/allocation.inline.hpp	Thu Mar 22 20:21:19 2018 -0700
+++ b/src/hotspot/share/memory/allocation.inline.hpp	Thu Mar 22 12:34:31 2018 +0100
@@ -105,7 +105,7 @@
 }
 
 template<class E>
-void MallocArrayAllocator<E>::free(E* addr, size_t /*length*/) {
+void MallocArrayAllocator<E>::free(E* addr) {
   FreeHeap(addr);
 }
 
@@ -152,7 +152,7 @@
 
 template<class E>
 void ArrayAllocator<E>::free_malloc(E* addr, size_t length) {
-  MallocArrayAllocator<E>::free(addr, length);
+  MallocArrayAllocator<E>::free(addr);
 }
 
 template<class E>