99 public CollectedHeap heap() {
100 return (CollectedHeap) heapConstructor.instantiateWrapperFor(collectedHeapField.getValue());
101 }
102
103
104 /** Returns "TRUE" iff "p" points into the allocated area of the heap. */
105 public boolean isIn(Address p) {
106 return heap().isIn(p);
107 }
108
109 /** Returns "TRUE" iff "p" points into the reserved area of the heap. */
110 public boolean isInReserved(Address p) {
111 return heap().isInReserved(p);
112 }
113
114 public void print() { printOn(System.out); }
115 public void printOn(PrintStream tty) {
116 heap().printOn(tty);
117 }
118
119 // Check whether an element of a typeArrayOop with the given type must be
120 // aligned 0 mod 8. The typeArrayOop itself must be aligned at least this
121 // strongly.
122 public static boolean elementTypeShouldBeAligned(BasicType type) {
123 return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
124 }
125
126 // Check whether an object field (static/non-static) of the given type must be
127 // aligned 0 mod 8.
128 public static boolean fieldTypeShouldBeAligned(BasicType type) {
129 return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
130 }
131 }
|
99 public CollectedHeap heap() {
100 return (CollectedHeap) heapConstructor.instantiateWrapperFor(collectedHeapField.getValue());
101 }
102
103
104 /** Returns "TRUE" iff "p" points into the allocated area of the heap. */
105 public boolean isIn(Address p) {
106 return heap().isIn(p);
107 }
108
109 /** Returns "TRUE" iff "p" points into the reserved area of the heap. */
110 public boolean isInReserved(Address p) {
111 return heap().isInReserved(p);
112 }
113
114 public void print() { printOn(System.out); }
115 public void printOn(PrintStream tty) {
116 heap().printOn(tty);
117 }
118
119 // Check whether an object field (static/non-static) of the given type must be
120 // aligned 0 mod 8.
121 public static boolean fieldTypeShouldBeAligned(BasicType type) {
122 return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
123 }
124 }
|