-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fixed memmanager and add assertion #277
Fixed memmanager and add assertion #277
Conversation
assertion added for functions which are returning status on freeing memory Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Hi @MichalPrincNXP i cannot test these changes but they should be valid. What do you think? |
As I told in #275 :
|
Nullptr can be inserted if allocation failed. Expected state. Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
@amgross As mentioned in same PR i was expecting you will add NULL check. But here it make sense too so i did it. |
what about the other comments? |
Which one do you mean? I don't see other comment |
Can't you see those code review comments in the thread? |
I can't. Maybe i pushed changes after your comment and it is hidden since then. For MemManager dependency i looked here: |
Interesting, I looked on other repository that has same functions with different inputs and return enum |
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
@amgross i pushed commit to be backward compatible. What do you think? |
Why do we need here backward compatibility? |
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.
Hi @Hadatko , I would remove the backward compatibility section/defines ... looking at the history of mem_manager NXP component, I am not able to find the MEM_BufferAllocForever() function (up to 2018 state). I would use MEM_BufferAllocWithId() directly.
I am also not able to verify the functionality of these two updated porting layers as these are not used in any maintained example/test.
#include "MemManager.h" should be changed to #include "fsl_component_mem_manager.h"
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
@MichalPrincNXP Is it ok now? |
I think so, thank you! |
assertion added for functions which are returning status on freeing memory
Signed-off-by: Cervenka Dusan cervenka@acrios.com
Pull request
Choose Correct
Describe the pull request
Some functions which are freeing memory are returning statuses. These should be checked.
To Reproduce
Expected behavior
Screenshots
Desktop (please complete the following information):
Steps you didn't forgot to do
Additional context