< prev index next >

src/share/vm/gc/parallel/adjoiningVirtualSpaces.hpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:
   1 /*
   2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_ADJOININGVIRTUALSPACES_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_ADJOININGVIRTUALSPACES_HPP
  27 
  28 #include "gc_implementation/parallelScavenge/psVirtualspace.hpp"
  29 
  30 
  31 // Contains two virtual spaces that each can individually span
  32 // most of the reserved region but committed parts of which
  33 // cannot overlap.
  34 //
  35 //      +-------+ <--- high_boundary for H
  36 //      |       |
  37 //      |   H   |
  38 //      |       |
  39 //      |       |
  40 //      |       |
  41 //      --------- <--- low for H
  42 //      |       |
  43 //      ========= <--- low_boundary for H, high_boundary for L
  44 //      |       |
  45 //      |       |
  46 //      |       |
  47 //      --------- <--- high for L
  48 //      |       |


  95   bool adjust_boundary_up(size_t size_in_bytes);
  96   // and down
  97   bool adjust_boundary_down(size_t size_in_bytes);
  98 
  99   // Maximum byte size for the high space.
 100   size_t high_byte_size_limit() {
 101     return _reserved_space.size() - _min_low_byte_size;
 102   }
 103   // Maximum byte size for the low space.
 104   size_t low_byte_size_limit() {
 105     return _reserved_space.size() - _min_high_byte_size;
 106   }
 107 
 108   // Sets the boundaries for the virtual spaces and commits and
 109   // initial size;
 110   void initialize(size_t max_low_byte_size,
 111                   size_t init_low_byte_size,
 112                   size_t init_high_byte_size);
 113 };
 114 
 115 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_ADJOININGVIRTUALSPACES_HPP
   1 /*
   2  * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_PARALLEL_ADJOININGVIRTUALSPACES_HPP
  26 #define SHARE_VM_GC_PARALLEL_ADJOININGVIRTUALSPACES_HPP
  27 
  28 #include "gc/parallel/psVirtualspace.hpp"
  29 
  30 
  31 // Contains two virtual spaces that each can individually span
  32 // most of the reserved region but committed parts of which
  33 // cannot overlap.
  34 //
  35 //      +-------+ <--- high_boundary for H
  36 //      |       |
  37 //      |   H   |
  38 //      |       |
  39 //      |       |
  40 //      |       |
  41 //      --------- <--- low for H
  42 //      |       |
  43 //      ========= <--- low_boundary for H, high_boundary for L
  44 //      |       |
  45 //      |       |
  46 //      |       |
  47 //      --------- <--- high for L
  48 //      |       |


  95   bool adjust_boundary_up(size_t size_in_bytes);
  96   // and down
  97   bool adjust_boundary_down(size_t size_in_bytes);
  98 
  99   // Maximum byte size for the high space.
 100   size_t high_byte_size_limit() {
 101     return _reserved_space.size() - _min_low_byte_size;
 102   }
 103   // Maximum byte size for the low space.
 104   size_t low_byte_size_limit() {
 105     return _reserved_space.size() - _min_high_byte_size;
 106   }
 107 
 108   // Sets the boundaries for the virtual spaces and commits and
 109   // initial size;
 110   void initialize(size_t max_low_byte_size,
 111                   size_t init_low_byte_size,
 112                   size_t init_high_byte_size);
 113 };
 114 
 115 #endif // SHARE_VM_GC_PARALLEL_ADJOININGVIRTUALSPACES_HPP
< prev index next >