mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8003553: NPG: metaspace objects should be zeroed in constructors
Zero metadata in constructors, not in allocation (and some in constructors) Reviewed-by: jmasa, sspitsyn
This commit is contained in:
parent
4cdcd6dc13
commit
addd95f165
13 changed files with 111 additions and 97 deletions
|
@ -146,16 +146,16 @@ void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word
|
|||
Klass::Klass() {
|
||||
Klass* k = this;
|
||||
|
||||
{ // Preinitialize supertype information.
|
||||
// A later call to initialize_supers() may update these settings:
|
||||
set_super(NULL);
|
||||
for (juint i = 0; i < Klass::primary_super_limit(); i++) {
|
||||
_primary_supers[i] = NULL;
|
||||
}
|
||||
set_secondary_supers(NULL);
|
||||
_primary_supers[0] = k;
|
||||
set_super_check_offset(in_bytes(primary_supers_offset()));
|
||||
// Preinitialize supertype information.
|
||||
// A later call to initialize_supers() may update these settings:
|
||||
set_super(NULL);
|
||||
for (juint i = 0; i < Klass::primary_super_limit(); i++) {
|
||||
_primary_supers[i] = NULL;
|
||||
}
|
||||
set_secondary_supers(NULL);
|
||||
set_secondary_super_cache(NULL);
|
||||
_primary_supers[0] = k;
|
||||
set_super_check_offset(in_bytes(primary_supers_offset()));
|
||||
|
||||
set_java_mirror(NULL);
|
||||
set_modifier_flags(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue