src/hotspot/share/memory/metaspaceShared.hpp
changeset 48794 ea0d0781c63c
parent 47599 0fb1d501c408
child 49329 04ed29f9ef33
equal deleted inserted replaced
48793:b9a29dfaaeb2 48794:ea0d0781c63c
     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) {