-
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
Fix memory leak occurs every one second #17516
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullapprove
bot
requested review from
andy31415,
anush-apple,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
erjiaqing,
franck-apple,
gjc13,
hawk248,
harsha-rajendran,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kghost,
lazarkov,
LuDuda,
lzgrablic02,
mlepage-google,
mrjerryjohns and
msandstedt
April 19, 2022 17:48
pullapprove
bot
requested review from
robszewczyk,
sagar-apple,
saurabhst,
selissia,
tcarmelveilleux,
tecimovic,
vijs,
vivien-apple,
wbschiller,
woody-apple,
xylophone21 and
yunhanw-google
April 19, 2022 17:48
msandstedt
approved these changes
Apr 19, 2022
PR #17516: Size comparison from 03ea72d to 2ff8843 Increases (11 builds for linux)
Full report (27 builds for cc13x2_26x2, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
|
bzbarsky-apple
approved these changes
Apr 19, 2022
Co-authored-by: Boris Zbarsky <[email protected]>
PR #17516: Size comparison from 03ea72d to 1537b26 Increases (11 builds for linux)
Full report (32 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
andy31415
approved these changes
Apr 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
What is being fixed? Examples:
[1650341313.924547][224805:224805] CHIP:DL: :MemoryFree:94056079034944
[1650341313.924624][224805:224805] CHIP:DL: : SessionManager::ExpiryTimerCallback
[1650341313.924644][224805:224805] CHIP:DL: : SessionManager::ScheduleExpiryTimer
[1650341313.924663][224805:224805] CHIP:DL: : LayerImplSelect::StartTimer
[1650341313.924680][224805:224805] CHIP:DL: : TimerPool::Create
[1650341313.924696][224805:224805] CHIP:DL: :MemoryAlloc:94056079034944: size:40
[1650341313.924715][224805:224805] CHIP:DL: :MemoryAlloc:94056079036288: size:24
[1650341313.924733][224805:224805] CHIP:DL: : LayerImplSelect::StartTimer:94056079034944
[1650341318.930224][224805:224805] CHIP:DL: :MemoryFree:94056079034944
[1650341318.930301][224805:224805] CHIP:DL: : SessionManager::ExpiryTimerCallback
[1650341318.930321][224805:224805] CHIP:DL: : SessionManager::ScheduleExpiryTimer
[1650341318.930340][224805:224805] CHIP:DL: : LayerImplSelect::StartTimer
[1650341318.930356][224805:224805] CHIP:DL: : TimerPool::Create
[1650341318.930373][224805:224805] CHIP:DL: :MemoryAlloc:94056079034944: size:40
[1650341318.930391][224805:224805] CHIP:DL: :MemoryAlloc:94056079036192: size:24
[1650341318.930410][224805:224805] CHIP:DL: : LayerImplSelect::StartTimer:94056079034944
[1650341323.935877][224805:224805] CHIP:DL: :MemoryFree:94056079034944
[1650341323.935945][224805:224805] CHIP:DL: : SessionManager::ExpiryTimerCallback
[1650341323.935961][224805:224805] CHIP:DL: : SessionManager::ScheduleExpiryTimer
[1650341323.935977][224805:224805] CHIP:DL: : LayerImplSelect::StartTimer
[1650341323.935991][224805:224805] CHIP:DL: : TimerPool::Create
[1650341323.936004][224805:224805] CHIP:DL: :MemoryAlloc:94056079034944: size:40
[1650341323.936020][224805:224805] CHIP:DL: :MemoryAlloc:94056079036224: size:24
[1650341323.936033][224805:224805] CHIP:DL: : LayerImplSelect::StartTimer:94056079034944
For each timer created, we call MemoryAlloc twice, but only MemoryFree one of them after
Change overview
Release the node together with object immediately if not in the middle of iteration
Testing
How was this tested? (at least one bullet point required)