hotspot/src/share/vm/memory/blockOffsetTable.cpp
changeset 29580 a67a581cfe11
parent 24424 2658d7834c6e
equal deleted inserted replaced
29477:82f545c6572b 29580:a67a581cfe11
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2015, 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.
   790   size_t bottom_index = _array->index_for(_bottom);
   790   size_t bottom_index = _array->index_for(_bottom);
   791   _array->set_offset_array(bottom_index, 0);
   791   _array->set_offset_array(bottom_index, 0);
   792 }
   792 }
   793 
   793 
   794 size_t BlockOffsetArrayContigSpace::last_active_index() const {
   794 size_t BlockOffsetArrayContigSpace::last_active_index() const {
   795   size_t result = _next_offset_index - 1;
   795   return _next_offset_index == 0 ? 0 : _next_offset_index - 1;
   796   return result >= 0 ? result : 0;
   796 }
   797 }