src/hotspot/share/memory/padded.inline.hpp
changeset 50281 bc1336220671
parent 47216 71c04702a3d5
child 53244 9807daeb47c4
--- a/src/hotspot/share/memory/padded.inline.hpp	Mon May 28 09:59:11 2018 +0200
+++ b/src/hotspot/share/memory/padded.inline.hpp	Mon May 28 11:13:21 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,9 +62,8 @@
   size_t total_size = table_size + rows * row_size + alignment;
 
   // Allocate a chunk of memory large enough to allow alignment of the chunk.
-  void* chunk = AllocateHeap(total_size, flags);
+  void* chunk = MmapArrayAllocator<uint8_t>::allocate(total_size, flags);
   // Clear the allocated memory.
-  memset(chunk, 0, total_size);
   // Align the chunk of memory.
   T** result = (T**)align_up(chunk, alignment);
   void* data_start = (void*)((uintptr_t)result + table_size);