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

Improve support for mincore()

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.1.0
    • MMAPv1, Stability
    • POSIX (Darwin and Linux)
    • Storage Execution

    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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: