Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102482

Compress minorMappings in src/bluetooth/android/devicediscoverybroadcastreceiver.cpp

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.3.0
    • None

    Description

      The minorMappings static const data structure causes relocations by using an array of pointers. It also wastes space in the executable by duplicating the common prefixes that are already stored in majorMappings.

      We could make minorMappings store the strings instead of pointers to strings to remove the relocations, like we do in majorMappings, but some entries are very long (40+ character), so we'd be storing a lot of NULs. Better to use qOffsetStringArray, and to strip the common prefixes. We can re-construct the string on the stack with two strcpy()s into a statically-sized buffer from the prefix in majorMappings and the suffix in minorMappings.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ablasche Alex Blasche
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes