@@ -764,24 +764,25 @@ public UnsignedWord getUsedMemoryAfterLastGC() {
764764 }
765765
766766 private boolean printLocationInfo (Log log , Pointer ptr , boolean allowJavaHeapAccess , boolean allowUnsafeOperations ) {
767- for (ImageHeapInfo info : HeapImpl .getImageHeapInfos ()) {
768- if (info .isInAlignedReadOnly (ptr )) {
769- log .string ("points into the image heap (read-only)" );
767+ for (ImageHeapInfo imageHeap : HeapImpl .getImageHeapInfos ()) {
768+ /* Check from most-specific to least-specific. */
769+ if (imageHeap .isInAlignedReadOnlyRelocatable (ptr )) {
770+ log .string ("points into the image heap (aligned chunk, read-only relocatables)" );
770771 return true ;
771- } else if (info . isInAlignedReadOnlyRelocatable (ptr )) {
772- log .string ("points into the image heap (read-only relocatables )" );
772+ } else if (imageHeap . isInAlignedReadOnly (ptr )) {
773+ log .string ("points into the image heap (aligned chunk, read-only)" );
773774 return true ;
774- } else if (info .isInAlignedWritablePatched (ptr )) {
775- log .string ("points into the image heap (writable patched)" );
775+ } else if (imageHeap .isInAlignedWritablePatched (ptr )) {
776+ log .string ("points into the image heap (aligned chunk, writable patched)" );
776777 return true ;
777- } else if (info .isInAlignedWritable (ptr )) {
778- log .string ("points into the image heap (writable)" );
778+ } else if (imageHeap .isInAlignedWritable (ptr )) {
779+ log .string ("points into the image heap (aligned chunk, writable)" );
779780 return true ;
780- } else if (info .isInUnalignedWritable (ptr )) {
781- log .string ("points into the image heap (writable huge )" );
781+ } else if (imageHeap .isInUnalignedWritable (ptr )) {
782+ log .string ("points into the image heap (unaligned chunk, writable )" );
782783 return true ;
783- } else if (info .isInUnalignedReadOnly (ptr )) {
784- log .string ("points into the image heap (read-only huge )" );
784+ } else if (imageHeap .isInUnalignedReadOnly (ptr )) {
785+ log .string ("points into the image heap (unaligned chunk, read-only)" );
785786 return true ;
786787 }
787788 }
0 commit comments