Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26614

Do not round up buffer sizes when receiving Messages

    • Fully Compatible
    • Platforms 2016-10-31

      The MessagePort::recv class rounds up the size of the buffer it uses to hold a message coming off the network.

      There is no good reason to do so, and some reasons to actively not do so, since:

      • TCMalloc already groups allocations into size buckets
      • The extra allocation wastes 0.5kb on average for each server operation in progress
      • ASAN and other tools will see the extra bytes as valid to access, even though they contain garbage data, potentially masking bugs.

      We should remove the rounding.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: