Merge pull request #251 from Handlow1/master

fix a bug; nimble eventqueue pool memory overflow
This commit is contained in:
Supowang
2020-11-23 11:01:53 +08:00
committed by GitHub

View File

@@ -27,12 +27,12 @@ volatile int ble_npl_in_critical = 0;
void
npl_tencentos_tiny_eventq_init(struct ble_npl_eventq *evq)
{
void *msg_pool = tos_mmheap_alloc(sizeof(void *));
#define EVENT_Q_MSG_CNT 32
void *msg_pool = tos_mmheap_alloc(sizeof(void *) * EVENT_Q_MSG_CNT);
if (!msg_pool) {
return;
}
#define EVENT_Q_MSG_CNT 32
tos_msg_q_create(&evq->q, msg_pool, EVENT_Q_MSG_CNT);
}