Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-7741

memory allocator uses more memory for internal purposes than it should

    XMLWordPrintable

    Details

    • Type: Problem report
    • Status: Reopened
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Proxy (P), Server (S)
    • Labels:
    • Sprint:
      Sprint 51 (Apr 2019), Sprint 52 (May 2019), Sprint 53 (Jun 2019), Sprint 54 (Jul 2019), Sprint 57 (Oct 2019)
    • Story Points:
      3

      Description

      After ZBXNEXT-322 was implemented in r36765, the memory allocator started using more memory for internal purposes than it should.

      Namely, consider the description of memory allocator at the beginning of src/libs/zbxmemory/memalloc.c. There it is described how a chunk looks like. At the beginning and at the end of the chunk there is the size of the chunk. Before r36765, it used to be 4 bytes on each side for a total of 8 bytes. Now, it is 8 bytes on each side for a total of 16 bytes. So each free and allocated chunk now uses 8 bytes more of memory.

      The rationale for the change was that the maximum size for value cache is 64 GB, so 4 bytes is no longer enough to represent that free chunk size. However, since we never allocate more than 2 GB (which itself is extremely unlikely), we can split the initial free chunk of 64 GB into several smaller chunks of free memory.

        Attachments

          Activity

            People

            Assignee:
            zabbix.dev Zabbix Development Team
            Reporter:
            asaveljevs Aleksandrs Saveljevs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: