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

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

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.3.0
    • None
    • Android
    • 5
    • Foundation PM Prioritized

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes