-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Encode the user label list in place so that we can free the label lis… #16510
Encode the user label list in place so that we can free the label lis… #16510
Conversation
PR #16510: Size comparison from a19de20 to e9382f7 Increases above 0.2%:
Increases (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
PR #16510: Size comparison from a19de20 to f9e7187 Increases above 0.2%:
Increases (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Decreases (3 builds for esp32, nrfconnect)
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
PR #16510: Size comparison from b697b29 to 93acc99 Increases above 0.2%:
Increases (8 builds for cyw30739, efr32, esp32, k32w, linux, nrfconnect)
Decreases (9 builds for efr32, esp32, nrfconnect, p6, telink)
Full report (18 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
PR #16510: Size comparison from 0d98cc2 to 75eda66 Increases above 0.2%:
Increases (24 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6)
Decreases (9 builds for efr32, esp32, nrfconnect, p6, telink)
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
PR #16510: Size comparison from 6c692ab to d027ebc Increases above 0.2%:
Increases (19 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Decreases (12 builds for cc13x2_26x2, efr32, esp32, nrfconnect, p6, telink)
Full report (22 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
PR #16510: Size comparison from 6a55194 to 2d55f8f Increases above 0.2%:
Increases (14 builds for cc13x2_26x2, linux)
Decreases (21 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Full report (31 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
PR #16510: Size comparison from 6a55194 to 74ae92e Increases above 0.2%:
Increases (4 builds for cc13x2_26x2, nrfconnect)
Decreases (15 builds for cc13x2_26x2, cyw30739, k32w, mbed, nrfconnect, p6, telink)
Full report (15 builds for cc13x2_26x2, cyw30739, k32w, mbed, nrfconnect, p6, telink)
|
PR #16510: Size comparison from 6a55194 to 38b418a Increases above 0.2%:
Increases (16 builds for cc13x2_26x2, efr32, linux, nrfconnect)
Decreases (20 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, mbed, nrfconnect, p6, telink)
Full report (31 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
PR #16510: Size comparison from d170a25 to 6d959e9 Increases above 0.2%:
Increases (16 builds for cc13x2_26x2, cyw30739, k32w, linux)
Decreases (18 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Full report (31 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
project-chip#16510) * Encode the user label list in place so that we can free the label list after usage * Update src/app/clusters/user-label-server/user-label-server.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Refactor userlabellist API to DeviceInfoProvider * Add API documentation * Update src/include/platform/DeviceInfoProvider.h Co-authored-by: Boris Zbarsky <[email protected]> * Update src/include/platform/DeviceInfoProvider.h Co-authored-by: Boris Zbarsky <[email protected]> * Rename SetUserLabelCount/GetUserLabelCount to SetUserLabelLength/GetUserLabelLength Co-authored-by: Boris Zbarsky <[email protected]>
project-chip#16510) * Encode the user label list in place so that we can free the label list after usage * Update src/app/clusters/user-label-server/user-label-server.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Refactor userlabellist API to DeviceInfoProvider * Add API documentation * Update src/include/platform/DeviceInfoProvider.h Co-authored-by: Boris Zbarsky <[email protected]> * Update src/include/platform/DeviceInfoProvider.h Co-authored-by: Boris Zbarsky <[email protected]> * Rename SetUserLabelCount/GetUserLabelCount to SetUserLabelLength/GetUserLabelLength Co-authored-by: Boris Zbarsky <[email protected]>
project-chip#16510) * Encode the user label list in place so that we can free the label list after usage * Update src/app/clusters/user-label-server/user-label-server.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Refactor userlabellist API to DeviceInfoProvider * Add API documentation * Update src/include/platform/DeviceInfoProvider.h Co-authored-by: Boris Zbarsky <[email protected]> * Update src/include/platform/DeviceInfoProvider.h Co-authored-by: Boris Zbarsky <[email protected]> * Rename SetUserLabelCount/GetUserLabelCount to SetUserLabelLength/GetUserLabelLength Co-authored-by: Boris Zbarsky <[email protected]>
…t after usage
Problem
What is being fixed? Examples:
TCL hit problem when implementing _GetUserLabelList API on their product
Currently, API _GetUserLabelList returns a AttributeList with a list of CharSpan, we can allocate space to store those labels load from persistent storage in _GetUserLabelList(labelList), but we can not free this memory before return of _GetUserLabelList. If we call free after _GetUserLabelList() is called at userLabel cluster server, we don't know the appropriate way to release the memory since different platform may uses different mechanism to allocate the memory.
Fixes _GetUserLabelList are not able to impl without memory leak #16362
Change overview
Encode the user label list in place so that we can free the label list after usage.
Testing
How was this tested? (at least one bullet point required)