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_MEMORY_RESOURCEAREA_HPP
26 #define SHARE_VM_MEMORY_RESOURCEAREA_HPP
27
28 #include "memory/allocation.hpp"
29 #ifdef TARGET_OS_FAMILY_linux
30 # include "thread_linux.inline.hpp"
31 #endif
32 #ifdef TARGET_OS_FAMILY_solaris
33 # include "thread_solaris.inline.hpp"
34 #endif
35 #ifdef TARGET_OS_FAMILY_windows
36 # include "thread_windows.inline.hpp"
37 #endif
38 #ifdef TARGET_OS_FAMILY_bsd
39 # include "thread_bsd.inline.hpp"
40 #endif
41
42 // The resource area holds temporary data structures in the VM.
43 // The actual allocation areas are thread local. Typical usage:
44 //
45 // ...
46 // {
47 // ResourceMark rm;
48 // int foo[] = NEW_RESOURCE_ARRAY(int, 64);
49 // ...
50 // }
51 // ...
52
53 //------------------------------ResourceArea-----------------------------------
54 // A ResourceArea is an Arena that supports safe usage of ResourceMark.
55 class ResourceArea: public Arena {
56 friend class ResourceMark;
57 friend class DeoptResourceMark;
58 friend class VMStructs;
59 debug_only(int _nesting;) // current # of nested ResourceMarks
60 debug_only(static int _warned;) // to suppress multiple warnings
|
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_MEMORY_RESOURCEAREA_HPP
26 #define SHARE_VM_MEMORY_RESOURCEAREA_HPP
27
28 #include "memory/allocation.hpp"
29 #include "runtime/thread.inline.hpp"
30
31 // The resource area holds temporary data structures in the VM.
32 // The actual allocation areas are thread local. Typical usage:
33 //
34 // ...
35 // {
36 // ResourceMark rm;
37 // int foo[] = NEW_RESOURCE_ARRAY(int, 64);
38 // ...
39 // }
40 // ...
41
42 //------------------------------ResourceArea-----------------------------------
43 // A ResourceArea is an Arena that supports safe usage of ResourceMark.
44 class ResourceArea: public Arena {
45 friend class ResourceMark;
46 friend class DeoptResourceMark;
47 friend class VMStructs;
48 debug_only(int _nesting;) // current # of nested ResourceMarks
49 debug_only(static int _warned;) // to suppress multiple warnings
|