hotspot/src/share/vm/memory/resourceArea.hpp
changeset 34633 2a6c7c7b30a7
parent 25946 1572c9f03fb9
child 37456 bf26e0f4235f
equal deleted inserted replaced
34632:bf3518bba285 34633:2a6c7c7b30a7
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 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.
   119     _area(r), _chunk(r->_chunk), _hwm(r->_hwm), _max(r->_max) {
   119     _area(r), _chunk(r->_chunk), _hwm(r->_hwm), _max(r->_max) {
   120     _size_in_bytes = r->_size_in_bytes;
   120     _size_in_bytes = r->_size_in_bytes;
   121     debug_only(_area->_nesting++;)
   121     debug_only(_area->_nesting++;)
   122     assert( _area->_nesting > 0, "must stack allocate RMs" );
   122     assert( _area->_nesting > 0, "must stack allocate RMs" );
   123 #ifdef ASSERT
   123 #ifdef ASSERT
   124     Thread* thread = ThreadLocalStorage::thread();
   124     Thread* thread = Thread::current_or_null();
   125     if (thread != NULL) {
   125     if (thread != NULL) {
   126       _thread = thread;
   126       _thread = thread;
   127       _previous_resource_mark = thread->current_resource_mark();
   127       _previous_resource_mark = thread->current_resource_mark();
   128       thread->set_current_resource_mark(this);
   128       thread->set_current_resource_mark(this);
   129     } else {
   129     } else {