You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/12/22 01:18:05 UTC

[GitHub] [mynewt-nimble] jimmo opened a new issue #896: Service re-registration leads to increasingly large allocs

jimmo opened a new issue #896:
URL: https://github.com/apache/mynewt-nimble/issues/896


   hi! I'm from the [MicroPython](https://github.com/micropython/micropython) project. We provide a Python API around NimBLE, but we've run into a problem due to the fact that the Python program can be restarted without the board restarting. We do what we can (via the public API) to shutdown and reset NimBLE across these "program resets" but I've just noticed an issue that during service registration we see increasingly large calls to `malloc()` from `ble_gatts_count_cfg()`.
   
   The cause is that although we call `gatts_reset()`, nothing resets `ble_hs_max_services` `ble_hs_max_attrs` and `ble_hs_max_client_configs`. I am currently working around this by resetting them from our code.
   
   I think the feature we really want is a global "nimble_reset" function that clears/resets all global variables (i.e. zeros .bss variables and resets .data variables back to default values, as if the board has just restarted).
   
   I understand this is a bit of a weird requirement -- not many implementors of NimBLE would need to register services more than once per hard reset, but would appreciate any suggestions. Thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org