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

Improve MemorySegment::toString

    XMLWordPrintable

Details

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

    Description

      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 }

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: