Our peripheral application on the CC2541 is (as many others on the forum) stretching the RAM to its limits.
We have INT_HEAP_LEN=3290 (which leaves 6 unused bytes...), and that works ok for most uses. Every 50ms (triggered by the periodic event timer), we check for the number of failed allocations - we have instrumented OSAL_Memory.c for this. If the number of failed allocations is nonzero, we halt.
Recently, we've been extending the application to receive bulk data form the connected client. It seems that Low-ish rates work ok, but high rates cause a significant increase in heap use. The heap use of the application itself does not depend of the rate of incoming data.
So, two questions:
1: Can anyone confirm that heap usage increases with the rate of incoming data ?
2: Is the BLE stack tolerant to failed calls to osal_mem_alloc() - or can unpredictable behaviour be expected in case of failures ?
<rant>Access to the source code for the BLE stack would be REALLY nice...</rant>
BR
Per Laursen