equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_ADLC_ARENA_HPP |
25 #ifndef SHARE_VM_ADLC_ARENA_HPP |
26 #define SHARE_VM_ADLC_ARENA_HPP |
26 #define SHARE_VM_ADLC_ARENA_HPP |
27 |
27 |
28 // All classes in the virtual machine must be subclassed |
28 // All classes in adlc may be derived |
29 // by one of the following allocation classes: |
29 // from one of the following allocation classes: |
30 // |
30 // |
31 // |
31 // For objects allocated in the C-heap (managed by: malloc & free). |
32 // For objects allocated in the C-heap (managed by: free & malloc). |
|
33 // - CHeapObj |
32 // - CHeapObj |
34 // |
|
35 // |
|
36 // For embedded objects. |
|
37 // - ValueObj |
|
38 // |
33 // |
39 // For classes used as name spaces. |
34 // For classes used as name spaces. |
40 // - AllStatic |
35 // - AllStatic |
41 // |
36 // |
42 |
37 |
45 void* operator new(size_t size) throw(); |
40 void* operator new(size_t size) throw(); |
46 void operator delete(void* p); |
41 void operator delete(void* p); |
47 void* new_array(size_t size); |
42 void* new_array(size_t size); |
48 }; |
43 }; |
49 |
44 |
50 |
|
51 // Base class for objects used as value objects. |
|
52 // Calling new or delete will result in fatal error. |
|
53 |
|
54 class ValueObj { |
|
55 public: |
|
56 void* operator new(size_t size) throw(); |
|
57 void operator delete(void* p); |
|
58 }; |
|
59 |
45 |
60 // Base class for classes that constitute name spaces. |
46 // Base class for classes that constitute name spaces. |
61 |
47 |
62 class AllStatic { |
48 class AllStatic { |
63 public: |
49 public: |