8200111: MallocArrayAllocator::free should not take a length parameter

Reviewed-by: gtriantafill, coleenp, tschatzl
This commit is contained in:
Stefan Karlsson 2018-03-22 12:34:31 +01:00
parent 98db6d11f3
commit 124c5f4f52
2 changed files with 3 additions and 3 deletions

View File

@ -549,7 +549,7 @@ class MallocArrayAllocator : public AllStatic {
static size_t size_for(size_t length); static size_t size_for(size_t length);
static E* allocate(size_t length, MEMFLAGS flags); 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 #endif // SHARE_VM_MEMORY_ALLOCATION_HPP

View File

@ -105,7 +105,7 @@ E* MallocArrayAllocator<E>::allocate(size_t length, MEMFLAGS flags) {
} }
template<class E> template<class E>
void MallocArrayAllocator<E>::free(E* addr, size_t /*length*/) { void MallocArrayAllocator<E>::free(E* addr) {
FreeHeap(addr); FreeHeap(addr);
} }
@ -152,7 +152,7 @@ E* ArrayAllocator<E>::reallocate(E* old_addr, size_t old_length, size_t new_leng
template<class E> template<class E>
void ArrayAllocator<E>::free_malloc(E* addr, size_t length) { void ArrayAllocator<E>::free_malloc(E* addr, size_t length) {
MallocArrayAllocator<E>::free(addr, length); MallocArrayAllocator<E>::free(addr);
} }
template<class E> template<class E>