Skip to content

Commit a7c5523

Browse files
Donatien GarnierCruz Monrreal II
authored andcommitted
Cordio: Assert if memory pool is not exactly the right size
1 parent 7f418f4 commit a7c5523

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ void BLE::stack_setup()
330330
buf_pool_desc.pool_count, buf_pool_desc.pool_description
331331
);
332332

333-
MBED_ASSERT(bytes_used != 0);
333+
// This assert will fail if we've either allocated too much or too little memory
334+
// (bytes_used would be set to 0 in that case)
335+
MBED_ASSERT(bytes_used == buf_pool_desc.buffer_size);
334336

335337
WsfTimerInit();
336338
SecInit();

0 commit comments

Comments
 (0)