< prev index next >

src/hotspot/share/classfile/compactHashtable.cpp

Print this page




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"

  26 #include "classfile/compactHashtable.inline.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "logging/logMessage.hpp"
  29 #include "memory/metadataFactory.hpp"
  30 #include "memory/metaspaceShared.hpp"
  31 #include "prims/jvm.h"
  32 #include "runtime/vmThread.hpp"
  33 #include "utilities/numberSeq.hpp"
  34 #include <sys/stat.h>
  35 
  36 /////////////////////////////////////////////////////
  37 //
  38 // The compact hash table writer implementations
  39 //
  40 CompactHashtableWriter::CompactHashtableWriter(int num_buckets,
  41                                                CompactHashtableStats* stats) {
  42   assert(DumpSharedSpaces, "dump-time only");
  43   assert(num_buckets > 0, "no buckets");
  44   _num_buckets = num_buckets;
  45   _num_entries = 0;
  46   _buckets = NEW_C_HEAP_ARRAY(GrowableArray<Entry>*, _num_buckets, mtSymbol);
  47   for (int i=0; i<_num_buckets; i++) {
  48     _buckets[i] = new (ResourceObj::C_HEAP, mtSymbol) GrowableArray<Entry>(0, true, mtSymbol);
  49   }
  50 
  51   _stats = stats;




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "classfile/compactHashtable.inline.hpp"
  28 #include "classfile/javaClasses.hpp"
  29 #include "logging/logMessage.hpp"
  30 #include "memory/metadataFactory.hpp"
  31 #include "memory/metaspaceShared.hpp"

  32 #include "runtime/vmThread.hpp"
  33 #include "utilities/numberSeq.hpp"
  34 #include <sys/stat.h>
  35 
  36 /////////////////////////////////////////////////////
  37 //
  38 // The compact hash table writer implementations
  39 //
  40 CompactHashtableWriter::CompactHashtableWriter(int num_buckets,
  41                                                CompactHashtableStats* stats) {
  42   assert(DumpSharedSpaces, "dump-time only");
  43   assert(num_buckets > 0, "no buckets");
  44   _num_buckets = num_buckets;
  45   _num_entries = 0;
  46   _buckets = NEW_C_HEAP_ARRAY(GrowableArray<Entry>*, _num_buckets, mtSymbol);
  47   for (int i=0; i<_num_buckets; i++) {
  48     _buckets[i] = new (ResourceObj::C_HEAP, mtSymbol) GrowableArray<Entry>(0, true, mtSymbol);
  49   }
  50 
  51   _stats = stats;


< prev index next >