8295475: Move non-resource allocation strategies out of ResourceObj

Reviewed-by: coleenp, stuefe, rehn, dholmes
This commit is contained in:
Stefan Karlsson 2022-11-10 08:31:37 +00:00
parent e802b124b7
commit bfc5816595
164 changed files with 444 additions and 415 deletions

View file

@ -571,7 +571,7 @@ void ClassLoader::setup_patch_mod_entries() {
int num_of_entries = patch_mod_args->length();
// Set up the boot loader's _patch_mod_entries list
_patch_mod_entries = new (ResourceObj::C_HEAP, mtModule) GrowableArray<ModuleClassPathList*>(num_of_entries, mtModule);
_patch_mod_entries = new (mtModule) GrowableArray<ModuleClassPathList*>(num_of_entries, mtModule);
for (int i = 0; i < num_of_entries; i++) {
const char* module_name = (patch_mod_args->at(i))->module_name();
@ -1508,7 +1508,7 @@ void ClassLoader::classLoader_init2(JavaThread* current) {
// done before loading any classes, by the same thread that will
// subsequently do the first class load. So, no lock is needed for this.
assert(_exploded_entries == NULL, "Should only get initialized once");
_exploded_entries = new (ResourceObj::C_HEAP, mtModule)
_exploded_entries = new (mtModule)
GrowableArray<ModuleClassPathList*>(EXPLODED_ENTRY_SIZE, mtModule);
add_to_exploded_build_list(current, vmSymbols::java_base());
}