-
Notifications
You must be signed in to change notification settings - Fork 3
Fix Memory Leaks / fix Dead Locks / correct mbrBlockDevice behaviour when calling begin(),umount(),format() #39
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
base: main
Are you sure you want to change the base?
Conversation
|
Memory usage change @ ef49605
Click for full report table
Click for full report CSV
|
Thanks a lot @ddmesh for your contribution! We'll take a look at your PR shortly 👀 |
Hi @ddmesh, thanks for the patch, but in its current state it is unmergeable. |
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.
Need to split into multiple commits to make code review feasible
Hi, I can not split this commit into several. There are not so much changes and those should be checked easily. Most code editors like VSCode will remove spaces automatically to avoid more visible changes in future in source code. So it is always a good idea to never check-in code that has spaces at line end. Please compare the code with spaces ignored. Git CI tells that all tests are successful, only one reviewer is needed. The code is mergable, as there are no merge conflicts. All changes are on top on main branch. |
@ddmesh can you sign the CLA please? I'll then proceed in splitting the PR into sensible commits to keep the actual patch understandable for future readers 🙂 |
src/Utils.h
Outdated
@@ -39,7 +39,7 @@ | |||
|
|||
[[gnu::unused]] static String prettyPrintFileSystemType(FileSystems f){ | |||
if(f == 0) return "FAT"; | |||
else if(f == 1) return "LitlleFS"; | |||
else if(f == 1) return "LittleFS"; |
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.
This fix is also included in #44 as a single commit
hi, thanks a lot for splitting. I have signed the cla several times and it says that I already have it. but the state here is not updated. on cla website it is also listed as "signed". seems GitHub integration is not working correctly. |
I think the CLA is failing due to the committer being
The other modifications look sensible, anyway I'd ask @aliphys and @cristidragomir97 to give it a spin before merging |
I moved the creation/initialisation from begin to constructor because the blockdevice is global to "InternalStorage" and does not change at all over time. Only when the InternalStorage object is destroyed the device below becomes released. There is a 1:1 relation how long InternalStorage object lives and the lifetime of underlaying blockdevice. When user creates an instance of InternalStorage globally, you are right, that the order when a constructor is called is undefined. But a conflict with the underlaying blockdevice (e.g. QSPI flash) should not happen at all, because only one "owner" must initialise the underlaying blockdevice. Using different APIs or create more than one instance are a programming error. When you initialize the underlaying blockdevice in begin() you will have the same issue and more, beause you reinitialize the blockdevice several times without freeing it (memleak and deadlock). |
Memory usage change @ bd8600c
Click for full report table
Click for full report CSV
|
About the CLA, I tried to change "amend" the author from last commit, but his was ignored by github after pushing it (if this is the reason why the status is still "pending"). beside of this, when commiting and pushing to github, github replaces the email address anyway to protect privacy. Perhaps there is another reason why this is pending? |
I had a lot of instabilities while testing and evaluating this library and found a lot of issues that should be fixed in main stream.