1 /* |
1 /* |
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
203 // treat all objects as being inside the unmarked area. |
203 // treat all objects as being inside the unmarked area. |
204 zero_marked_bytes(); |
204 zero_marked_bytes(); |
205 init_top_at_mark_start(); |
205 init_top_at_mark_start(); |
206 } |
206 } |
207 |
207 |
208 void HeapRegion::hr_clear(bool par, bool clear_space) { |
208 void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) { |
209 assert(_humongous_type == NotHumongous, |
209 assert(_humongous_type == NotHumongous, |
210 "we should have already filtered out humongous regions"); |
210 "we should have already filtered out humongous regions"); |
211 assert(_humongous_start_region == NULL, |
211 assert(_humongous_start_region == NULL, |
212 "we should have already filtered out humongous regions"); |
212 "we should have already filtered out humongous regions"); |
213 assert(_end == _orig_end, |
213 assert(_end == _orig_end, |
221 reset_pre_dummy_top(); |
221 reset_pre_dummy_top(); |
222 |
222 |
223 if (!par) { |
223 if (!par) { |
224 // If this is parallel, this will be done later. |
224 // If this is parallel, this will be done later. |
225 HeapRegionRemSet* hrrs = rem_set(); |
225 HeapRegionRemSet* hrrs = rem_set(); |
226 hrrs->clear(); |
226 if (locked) { |
|
227 hrrs->clear_locked(); |
|
228 } else { |
|
229 hrrs->clear(); |
|
230 } |
227 _claimed = InitialClaimValue; |
231 _claimed = InitialClaimValue; |
228 } |
232 } |
229 zero_marked_bytes(); |
233 zero_marked_bytes(); |
230 |
234 |
231 _offsets.resize(HeapRegion::GrainWords); |
235 _offsets.resize(HeapRegion::GrainWords); |