mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-26 02:00:26 +00:00
Bluedroid stack dynamic allocation changes to optimise DRAM usage
Structures allocated dynamically: tACL_CONN, tBTM_PM_MCB, tBTM_SEC_DEV_REC, tGATT_TCB, tGATT_CLCB, tL2C_LCB, tL2C_CCB, tSDP_RECORD Total dynamic allocation size ~19KB. Peak dram usage reduced by ~12KB when in BT classic + BLE scenario(1 a2dp sink + 1 BLE gatt server)
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#define L2C_INT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "stack/btm_api.h"
|
||||
#include "stack/l2c_api.h"
|
||||
#include "stack/l2cdefs.h"
|
||||
@@ -372,6 +371,7 @@ typedef struct {
|
||||
|
||||
#endif /* (L2CAP_ROUND_ROBIN_CHANNEL_SERVICE == TRUE) */
|
||||
|
||||
|
||||
/* Define a link control block. There is one link control block between
|
||||
** this device and any other device (i.e. BD ADDR).
|
||||
*/
|
||||
@@ -466,6 +466,7 @@ typedef struct t_l2c_linkcb {
|
||||
|
||||
} tL2C_LCB;
|
||||
|
||||
|
||||
/* Define the L2CAP control structure
|
||||
*/
|
||||
typedef struct {
|
||||
@@ -478,12 +479,10 @@ typedef struct {
|
||||
|
||||
BOOLEAN is_cong_cback_context;
|
||||
|
||||
tL2C_LCB lcb_pool[MAX_L2CAP_LINKS]; /* Link Control Block pool */
|
||||
tL2C_CCB ccb_pool[MAX_L2CAP_CHANNELS]; /* Channel Control Block pool */
|
||||
list_t *p_lcb_pool; /* Link Control Block pool */
|
||||
list_t *p_ccb_pool; /* Channel Control Block pool */
|
||||
tL2C_RCB rcb_pool[MAX_L2CAP_CLIENTS]; /* Registration info pool */
|
||||
|
||||
tL2C_CCB *p_free_ccb_first; /* Pointer to first free CCB */
|
||||
tL2C_CCB *p_free_ccb_last; /* Pointer to last free CCB */
|
||||
|
||||
UINT8 desire_role; /* desire to be master/slave when accepting a connection */
|
||||
BOOLEAN disallow_switch; /* FALSE, to allow switch at create conn */
|
||||
|
Reference in New Issue
Block a user