src/hotspot/share/memory/arena.cpp
changeset 55745 fa337ff85b9a
parent 54786 ebf733a324d4
child 59113 700a2ad8fc19
equal deleted inserted replaced
55744:59d56b8b1a80 55745:fa337ff85b9a
     1 /*
     1 /*
     2  * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2019, 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.
   473 //--------------------------------------------------------------------------------------
   473 //--------------------------------------------------------------------------------------
   474 // Non-product code
   474 // Non-product code
   475 
   475 
   476 #ifndef PRODUCT
   476 #ifndef PRODUCT
   477 
   477 
   478 julong Arena::_bytes_allocated = 0;
       
   479 
       
   480 void Arena::inc_bytes_allocated(size_t x) { inc_stat_counter(&_bytes_allocated, x); }
       
   481 
       
   482 // debugging code
   478 // debugging code
   483 inline void Arena::free_all(char** start, char** end) {
   479 inline void Arena::free_all(char** start, char** end) {
   484   for (char** p = start; p < end; p++) if (*p) os::free(*p);
   480   for (char** p = start; p < end; p++) if (*p) os::free(*p);
   485 }
   481 }
   486 
   482