equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2012, 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. |
238 NOT_PRODUCT(ZapUnusedHeapArea = old_ZapUnusedHeapArea;) |
238 NOT_PRODUCT(ZapUnusedHeapArea = old_ZapUnusedHeapArea;) |
239 |
239 |
240 if (_ro_space == NULL || _rw_space == NULL) |
240 if (_ro_space == NULL || _rw_space == NULL) |
241 vm_exit_during_initialization("Could not allocate a shared space"); |
241 vm_exit_during_initialization("Could not allocate a shared space"); |
242 |
242 |
243 // Cover both shared spaces entirely with cards. |
|
244 _rs->resize_covered_region(MemRegion(readonly_bottom, readwrite_end)); |
|
245 |
|
246 if (UseSharedSpaces) { |
243 if (UseSharedSpaces) { |
247 |
244 |
248 // Map in the regions in the shared file. |
245 // Map in the regions in the shared file. |
249 FileMapInfo* mapinfo = FileMapInfo::current_info(); |
246 FileMapInfo* mapinfo = FileMapInfo::current_info(); |
250 size_t image_alignment = mapinfo->alignment(); |
247 size_t image_alignment = mapinfo->alignment(); |
277 delete _rw_bts; |
274 delete _rw_bts; |
278 _rw_bts = NULL; |
275 _rw_bts = NULL; |
279 delete _rw_space; |
276 delete _rw_space; |
280 _rw_space = NULL; |
277 _rw_space = NULL; |
281 shared_end = (HeapWord*)(rs.base() + rs.size()); |
278 shared_end = (HeapWord*)(rs.base() + rs.size()); |
282 _rs->resize_covered_region(MemRegion(shared_bottom, shared_bottom)); |
|
283 } |
279 } |
|
280 } |
|
281 |
|
282 if (spec()->enable_shared_spaces()) { |
|
283 // Cover both shared spaces entirely with cards. |
|
284 _rs->resize_covered_region(MemRegion(readonly_bottom, readwrite_end)); |
284 } |
285 } |
285 |
286 |
286 // Reserved region includes shared spaces for oop.is_in_reserved(). |
287 // Reserved region includes shared spaces for oop.is_in_reserved(). |
287 _reserved.set_end(shared_end); |
288 _reserved.set_end(shared_end); |
288 |
289 |