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

NMT: NMTUsage total_committed returns reserved memory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • hotspot

      See how NMTUsage::total_committed uses _vm_total.reserved instead of _vm_total.committed:
      ```
      size_t NMTUsage::total_reserved() const {
        return _malloc_total + _vm_total.reserved;
      }

      size_t NMTUsage::total_committed() const {
        return _malloc_total + _vm_total.reserved;
      }

      size_t NMTUsage::reserved(MEMFLAGS flag) const {
        int index = NMTUtil::flag_to_index(flag);
        return _malloc_by_type[index] + _vm_by_type[index].reserved;
      }

      size_t NMTUsage::committed(MEMFLAGS flag) const {
        int index = NMTUtil::flag_to_index(flag);
        return _malloc_by_type[index] + _vm_by_type[index].committed;
      }
      ```

            Unassigned Unassigned
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: