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:
Coleen Phillimore 2013-03-08 11:47:57 -05:00
parent 4cdcd6dc13
commit addd95f165
13 changed files with 111 additions and 97 deletions

View file

@ -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);