Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8316190

Improve MemorySegment::toString

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 22
    • core-libs
    • None
    • b16

      A segment could either be a heap segment or a native segment. Never both at the same time. However, a heap segment might have an offset if it was sliced. So, instead of this:

      heapSegment = MemorySegment{ heapBase: Optional[[B@7ea987ac] address: 0x2, byteSize: 2 }
      nativeSegment = MemorySegment{ heapBase: Optional.empty address: 0x6000006a1da0, byteSize: 2 }

      It would be better to do this:

      heapSegment = MemorySegment{ heapBase: [B@7ea987ac, address: 0x2, byteSize: 2 }
      nativeSegment = MemorySegment{ address:0x6000006a1da0, byteSize: 2 }

            pminborg Per-Ake Minborg
            pminborg Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: