NMT: NMTUsage total_committed returns reserved memory

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: 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;
      }
      ```

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

              Created:
              Updated:
              Resolved: