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

NMT2 leaks memory

XMLWordPrintable

    • b30
    • Not verified

        NMT2 detects memory leak in NMT2 implementation.

        NMT2 tries to baseline memory into an arena. Virtual memory's reserved regions (ReservedMemoryRegion) are baselined into the arena, however, the committed regions (CommittedMemoryRegion) inside the reserved regions are allocated on C heap.

        When the baseline is discarded, it simply discards the arena, which do not invoke ReservedMemoryRegion's dtor, therefore, committed regions are not free.

        [0x000000005f14eb29] ResourceObj::operator new+0x99
        [0x000000005f5905da] SortedLinkedList<CommittedMemoryRegion,&compare_committed_region,2,10,1>::add+0x2a
        [0x000000005f58e20f] ReservedMemoryRegion::operator=+0xef
        [0x000000005f590918] LinkedListNode<ReservedMemoryRegion>::LinkedListNode<ReservedMemoryRegion>+0x78
                                     (malloc=5KB +5KB #54 +54)



              zgu Zhengyu Gu
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: