onomondo / nrf-softsim

Manifest repo for integrating SoftSIM and nrf-sdk
30 stars 6 forks source link

fix: 🐛 Heap corrupted by de-initializing softsim many times #24

Closed peterbornerup closed 9 months ago

peterbornerup commented 9 months ago

A buffer in the file-system wrapper was wrongly freed using a libc implementation instead of the k_free causing the heap to be corrupted over time.

A heap trace was installed to verify that all memory associated with softsim is correctly freed:

After toggling softsim 50 times the heap was still fully available

INFO: Allocated Heap = 32
INFO: Free Heap = 29864
INFO: Max Allocated Heap = 17232