-
Notifications
You must be signed in to change notification settings - Fork 217
Memory leak in HCICordioTransportClass #106
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
Comments
Hi @Wenn0101 , |
Hi @polldo Thanks for the response. Taking a closer look, I am beginning to understand more the purpose of this I guess my problems come back to defining this when the target I am using does not utilize this in the mbed core. Right now it seems to me that this Why is the For example why is
Or to put it another way, perhaps I should re-name my issue " Library does not work without Sorry to ask the same question in so many ways. I think I may just be missing a piece of how this library is supposed to work, and the mismatch in my mind is that the |
misclick closing issue, I would appreciate feedback on my comment. |
@Wenn0101 you are right, at the moment |
@Wenn0101 I would like to be more precise. Our
|
@polldo Thanks for the clarification. I think my problem really stems from the fact that I am porting a target that: This left me wanting to utilize the bleloop as if I was part of your first group, but the target was not configured to free the HCI messages as if i was in the latter group. This is a suitable workaround, and we can close this issue if you would like. I think in my mind it is still lingering that the macro HCI_ZERO_COPY is being used to determine whether the host and controller are combined on a single chip solution, but there can exist cases where an single chip solution does not want to utilize HCI_ZERO_COPY. If you are curious the mbed target I am porting can be found here. |
@Wenn0101 your workaround sounds good to me.
I agree with you, supporting this use case could be a future enhancement. |
I am working on porting this library to a new target, and I have found what I believe may be a memory leak in the HCICordioTransportClass::write() function.
In file \ArduinoBLE\src\utility\HCICordioTransport.cpp
If CORDIO_ZERO_COPY_HCI is defined, memory is allocated, and I am never seeing it freed. Where are these messages supposed to be freed?
Locally I have made changes so that the allocated memory is freed after transmitting.This has solved my problem of running out of space and receiving a null pointer from WsfMsgAlloc(). However, I get the feeling that I am missing something about how this is supposed to work.
My code is:
The text was updated successfully, but these errors were encountered: