-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Linux] Convert possible glib objects to GAutoPtr #29340
Conversation
PR #29340: Size comparison from b516ff4 to 973cdda Increases above 0.2%:
Increases (13 builds for linux)
Full report (66 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #29340: Size comparison from b516ff4 to 5e03e5f Increases above 0.2%:
Increases (13 builds for linux)
Full report (66 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Helper.cpp there are variables of type of GList *
which are deleted at the end of a function. I think that you can create a proper deleter and use use GAutoPtr
Also, you can replace char * expectedPath
5e03e5f
to
e63baef
Compare
I think this should be managed manually. Attempting a simple conversion to GAutoPtr will end in a segmentation error. |
PR #29340: Size comparison from 6bb0b71 to e63baef Increases above 0.2%:
Increases (13 builds for linux)
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
15c378a
to
3ba5fb8
Compare
PR #29340: Size comparison from 6bb0b71 to 3ba5fb8 Increases (13 builds for linux)
Decreases (1 build for bl702l)
Full report (65 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
ea7df3a
to
ce3906a
Compare
PR #29340: Size comparison from 433e676 to ce3906a Increases above 0.2%:
Increases (13 builds for linux)
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #29340: Size comparison from 54a1460 to 5e0fcb8 Increases (13 builds for linux)
Decreases (9 builds for linux)
Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
5e0fcb8
to
84e1d20
Compare
PR #29340: Size comparison from 2d07e21 to 84e1d20 Full report (1 build for cc32xx)
|
PR #29340: Size comparison from 2d07e21 to aec4410 Increases (2 builds for linux)
Decreases (1 build for linux)
Full report (43 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg)
|
PR #29340: Size comparison from 2d07e21 to 2769a98 Increases (13 builds for linux)
Decreases (11 builds for linux, telink)
Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
* Replace g_variant_dict_lookup_value to g_variant_lookup_value in src/platform/Linux/bluez/Helper.cpp * Add template <> struct GAutoPtrDeleter<const char *> * Convert keyMgmts to GAutoPtr in src/platform/Linux/ConnectivityManagerImpl.cpp * Revert in ConnectionDataBundle GVariant convert to GAutoPtr
2769a98
to
a276d23
Compare
PR #29340: Size comparison from c534070 to a276d23 Increases (13 builds for linux)
Decreases (10 builds for linux)
Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
* Replace glib GError with GAutoPtr<GError> in AdapterIterator * Replace glib GError with GAutoPtr<GError> in ChipDeviceScanner * Replace glib GError with GAutoPtr<GError> in Bluez helper * Replace glib GError with GAutoPtr<GError> in ConnectivityMangaerImpl * Replace glib GVariant with GAutoPtr<GVariant> in ConnectivityManagerImpl * Replace glib GVariant with GAutoPtr<GVariant> in Bluez helper * Replace glib and char with GAutoPtr<char> in Bluez helper * Replace glib and GVariantDict with GAutoPtr<GVariantDict> in Bluez helper - review * Fix badly used MakeUniquePointerReceiver * Review changes * Replace g_variant_dict_lookup_value to g_variant_lookup_value in src/platform/Linux/bluez/Helper.cpp * Add template <> struct GAutoPtrDeleter<const char *> * Convert keyMgmts to GAutoPtr in src/platform/Linux/ConnectivityManagerImpl.cpp * Revert in ConnectionDataBundle GVariant convert to GAutoPtr * Review update - remove GVariantDict * Add errorhandling for keyMgmtsHendle
Problem
Linux still has explicit glib memory management. This is follow-up PRs (#28304) which will replace glib explicit memory management with GAutoPtr<>.
Changes
Changed explicit memory management of glib objects to GAutoPtr<> where possible for the Linux platform.
Testing
CI will test for potential build breaks.
Valgrind test result for linux-x64-light target: