equal
deleted
inserted
replaced
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 { |