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

Improve support for mincore()

    XMLWordPrintable

    Details

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

      Description

      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?

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: