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

Improve support for mincore()

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.1.0
    • Component/s: MMAPv1, Stability
    • Labels:
    • Environment:
      POSIX (Darwin and Linux)
    • Storage Execution

      ProcessInfo::blockInMemory(char *start) does not appropriately account for a block of memory. The following logic disregards where the address was within the page:

              start = start - ( (unsigned long long)start % pageSize );
      

      While it may be unlikely we would need to call this function with an unaligned address, it could cause unexpected results when an unaligned start address is passed in. Additionally, this function only checks a single page (128 bytes, which gets rounded up to the next page boundry), although ranges are supported by mincore() on Linux and Darwin. Perhaps it's worth adding an optional length parameter and ensuring support for memory that spans multiple pages?

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            benjamin.becker Ben Becker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: