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
39 // The resource area holds temporary data structures in the VM.
40 // The actual allocation areas are thread local. Typical usage:
41 //
42 // ...
43 // {
44 // ResourceMark rm;
45 // int foo[] = NEW_RESOURCE_ARRAY(int, 64);
46 // ...
47 // }
48 // ...
49
50 //------------------------------ResourceArea-----------------------------------
51 // A ResourceArea is an Arena that supports safe usage of ResourceMark.
52 class ResourceArea: public Arena {
53 friend class ResourceMark;
54 friend class DeoptResourceMark;
55 friend class VMStructs;
56 debug_only(int _nesting;) // current # of nested ResourceMarks
57 debug_only(static int _warned;) // to suppress multiple warnings
|
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
|