Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14588

Optimize RtlpFindAndCommitPages

    XMLWordPrintable

Details

    Description

      ThFabba and I were able to determine that RtlpFindAndCommitPages performs a busy loop (its inner loop) that determines the last segment entry LastEntryInSegment of the heap:

      while (!(LastEntry->Flags & HEAP_ENTRY_LAST_ENTRY)) { LastEntry += LastEntry->Size }

      It may be possible, as seems to be done on Windows, to avoid that inner loop by computing the position and storing that LastEntryInSegment (in addition to the segment's first entry) everytime a heap operation is performed.

      Note: It needs to be implemented/fixed up in a bunch of places (potentially anywhere that HEAP_ENTRY_LAST_ENTRY is modified).

      Attachments

        Issue Links

          Activity

            People

              ThFabba ThFabba
              hbelusca hbelusca
              Votes:
              5 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: