equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2018, 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. |
162 _archive_loading_failed = true; |
162 _archive_loading_failed = true; |
163 } |
163 } |
164 static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); |
164 static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); |
165 static void initialize_shared_spaces() NOT_CDS_RETURN; |
165 static void initialize_shared_spaces() NOT_CDS_RETURN; |
166 |
166 |
167 // Return true if given address is in the mapped shared space. |
167 // Return true if given address is in the shared metaspace regions (i.e., excluding any |
168 static bool is_in_shared_space(const void* p) NOT_CDS_RETURN_(false); |
168 // mapped shared heap regions.) |
|
169 static bool is_in_shared_metaspace(const void* p) { |
|
170 // If no shared metaspace regions are mapped, MetaspceObj::_shared_metaspace_{base,top} will |
|
171 // both be NULL and all values of p will be rejected quickly. |
|
172 return (p < MetaspaceObj::_shared_metaspace_top && p >= MetaspaceObj::_shared_metaspace_base); |
|
173 } |
169 |
174 |
170 // Return true if given address is in the shared region corresponding to the idx |
175 // Return true if given address is in the shared region corresponding to the idx |
171 static bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false); |
176 static bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false); |
172 |
177 |
173 static bool is_heap_region(int idx) { |
178 static bool is_heap_region(int idx) { |