Mercurial > hg > truffle
comparison src/share/vm/oops/klass.cpp @ 8712:3efdfd6ddbf2
8003553: NPG: metaspace objects should be zeroed in constructors
Summary: Zero metadata in constructors, not in allocation (and some in constructors)
Reviewed-by: jmasa, sspitsyn
author | coleenp |
---|---|
date | Fri, 08 Mar 2013 11:47:57 -0500 |
parents | 3c9bc17b9403 |
children | 1fc4d4768b90 |
comparison
equal
deleted
inserted
replaced
8711:6b803ba47588 | 8712:3efdfd6ddbf2 |
---|---|
144 } | 144 } |
145 | 145 |
146 Klass::Klass() { | 146 Klass::Klass() { |
147 Klass* k = this; | 147 Klass* k = this; |
148 | 148 |
149 { // Preinitialize supertype information. | 149 // Preinitialize supertype information. |
150 // A later call to initialize_supers() may update these settings: | 150 // A later call to initialize_supers() may update these settings: |
151 set_super(NULL); | 151 set_super(NULL); |
152 for (juint i = 0; i < Klass::primary_super_limit(); i++) { | 152 for (juint i = 0; i < Klass::primary_super_limit(); i++) { |
153 _primary_supers[i] = NULL; | 153 _primary_supers[i] = NULL; |
154 } | 154 } |
155 set_secondary_supers(NULL); | 155 set_secondary_supers(NULL); |
156 _primary_supers[0] = k; | 156 set_secondary_super_cache(NULL); |
157 set_super_check_offset(in_bytes(primary_supers_offset())); | 157 _primary_supers[0] = k; |
158 } | 158 set_super_check_offset(in_bytes(primary_supers_offset())); |
159 | 159 |
160 set_java_mirror(NULL); | 160 set_java_mirror(NULL); |
161 set_modifier_flags(0); | 161 set_modifier_flags(0); |
162 set_layout_helper(Klass::_lh_neutral_value); | 162 set_layout_helper(Klass::_lh_neutral_value); |
163 set_name(NULL); | 163 set_name(NULL); |