Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

facchinm
Copy link
Contributor

Should fix #243 and maybe some other memory related issues.

Only tested in Peripheral mode, with services and characteristics allocated:

  • as global objects (arduino way)
  • in function stack
  • in heap

On mbed-enabled platforms, the memory check can be activated via


  ....
  mbed_stats_heap_t heap_stats;
  mbed_stats_heap_get(&heap_stats);
  Serial.print("Heap size: ");
  Serial.print(heap_stats.current_size);
  Serial.print(" / ");
  Serial.println(heap_stats.reserved_size);
  ....

Only tested in Peripheral mode, with services and characteristics allocated:
* as global objects (arduino way)
* in function stack
* in heap

On mbed-enabled platforms, the memory check can be activated via

```

  ....
  mbed_stats_heap_t heap_stats;
  mbed_stats_heap_get(&heap_stats);
  Serial.print("Heap size: ");
  Serial.print(heap_stats.current_size);
  Serial.print(" / ");
  Serial.println(heap_stats.reserved_size);
  ....
```
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Aug 31, 2022
@facchinm facchinm merged commit 5954d96 into arduino-libraries:master Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLE.begin() -> BLE.end() -> BLE.begin() [again]
2 participants