hotspot/src/share/vm/classfile/classLoader.cpp
changeset 38733 2b65f4db449e
parent 38697 110bb528423b
child 39210 178947361a68
equal deleted inserted replaced
38732:bb77e0dcc7e5 38733:2b65f4db449e
   655   Thread* THREAD = Thread::current();
   655   Thread* THREAD = Thread::current();
   656   GrowableArray<ModuleXPatchPath*>* xpatch_args = Arguments::get_xpatchprefix();
   656   GrowableArray<ModuleXPatchPath*>* xpatch_args = Arguments::get_xpatchprefix();
   657   int num_of_entries = xpatch_args->length();
   657   int num_of_entries = xpatch_args->length();
   658 
   658 
   659   // Set up the boot loader's xpatch_entries list
   659   // Set up the boot loader's xpatch_entries list
   660   _xpatch_entries = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<ModuleClassPathList*>(num_of_entries, true);
   660   _xpatch_entries = new (ResourceObj::C_HEAP, mtModule) GrowableArray<ModuleClassPathList*>(num_of_entries, true);
   661 
   661 
   662   for (int i = 0; i < num_of_entries; i++) {
   662   for (int i = 0; i < num_of_entries; i++) {
   663     const char* module_name = (xpatch_args->at(i))->module_name();
   663     const char* module_name = (xpatch_args->at(i))->module_name();
   664     Symbol* const module_sym = SymbolTable::lookup(module_name, (int)strlen(module_name), CHECK);
   664     Symbol* const module_sym = SymbolTable::lookup(module_name, (int)strlen(module_name), CHECK);
   665     assert(module_sym != NULL, "Failed to obtain Symbol for module name");
   665     assert(module_sym != NULL, "Failed to obtain Symbol for module name");
  1067   char* char_buf = (char*)buffer;
  1067   char* char_buf = (char*)buffer;
  1068   int buflen = (int)strlen(char_buf);
  1068   int buflen = (int)strlen(char_buf);
  1069   char* begin_ptr = char_buf;
  1069   char* begin_ptr = char_buf;
  1070   char* end_ptr = strchr(begin_ptr, '\n');
  1070   char* end_ptr = strchr(begin_ptr, '\n');
  1071   bool process_boot_modules = false;
  1071   bool process_boot_modules = false;
  1072   _boot_modules_array = new (ResourceObj::C_HEAP, mtInternal)
  1072   _boot_modules_array = new (ResourceObj::C_HEAP, mtModule)
  1073     GrowableArray<char*>(INITIAL_BOOT_MODULES_ARRAY_SIZE, true);
  1073     GrowableArray<char*>(INITIAL_BOOT_MODULES_ARRAY_SIZE, true);
  1074   _platform_modules_array = new (ResourceObj::C_HEAP, mtInternal)
  1074   _platform_modules_array = new (ResourceObj::C_HEAP, mtModule)
  1075     GrowableArray<char*>(INITIAL_PLATFORM_MODULES_ARRAY_SIZE, true);
  1075     GrowableArray<char*>(INITIAL_PLATFORM_MODULES_ARRAY_SIZE, true);
  1076   while (end_ptr != NULL && (end_ptr - char_buf) < buflen) {
  1076   while (end_ptr != NULL && (end_ptr - char_buf) < buflen) {
  1077     // Allocate a buffer from the C heap to be appended to the _boot_modules_array
  1077     // Allocate a buffer from the C heap to be appended to the _boot_modules_array
  1078     // or the _platform_modules_array.
  1078     // or the _platform_modules_array.
  1079     char* temp_name = NEW_C_HEAP_ARRAY(char, (size_t)(end_ptr - begin_ptr + 1), mtInternal);
  1079     char* temp_name = NEW_C_HEAP_ARRAY(char, (size_t)(end_ptr - begin_ptr + 1), mtInternal);