Failed to allocate memory using malloc in BT Stack
Posted: Sun Jul 15, 2018 9:29 pm
I am using A2DP source to send audio to headset.
From the log from BT Stack I can see there is this error from time to time printed out:
BT: ERROR btc_media_aa_prep_sbc_2_send no buffer TxCnt 3
I digged into BT stack and found out the code is like this:
And osi_malloc in my case is simply malloc. So malloc failed to allocate memory for me. I tried to increase A2DP source task stack size from 2048 to 3072, does not bring me anything.
Any hints? Thanks a lot!
adherent
From the log from BT Stack I can see there is this error from time to time printed out:
BT: ERROR btc_media_aa_prep_sbc_2_send no buffer TxCnt 3
I digged into BT stack and found out the code is like this:
Code: Select all
while (nb_frame) {
if (NULL == (p_buf = osi_malloc(BTC_MEDIA_AA_BUF_SIZE))) {
APPL_TRACE_ERROR ("ERROR btc_media_aa_prep_sbc_2_send no buffer TxCnt %d ",
fixed_queue_length(btc_aa_src_cb.TxAaQ));
return;
}
Any hints? Thanks a lot!
adherent