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

NMT: Malloc overhead is calculated incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 24
    • None
    • hotspot
    • b17

      On behalf of Kirill Leonov:
      Malloc overhead with NMT equals 18 bytes (16 bytes header + 2 bytes footer canary). Current implementation of malloc_overhead takes into account only header size ignoring the not footer canary.

      ```
      inline size_t malloc_overhead() const {
          return _all_mallocs.count() * sizeof(MallocHeader);
      }
      ```

      As a result tracking overhead calculated and reported incorrectly.

            eignatenko Evgeny Ignatenko
            eignatenko Evgeny Ignatenko
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: