[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bluetooth-dev] memory usage
we are planning to built a bluetooth-enabled embedded device based on
a microcontroller. on the software-side we are going to use a modified
axis stack (layers hci, l2cap, and sdp, no rfcomm and no tcs). a major
headache is the memory consumtion of the stack. we are aiming at less
than 10K for heap memory and program stack.
particularly "static hci_controller hci_ctrl;" in hci.c:401 is a nasty
monster. the structure holds more than 136,000 bytes in 8 buffers of
type hci_in_buffer (hci.c:273) of 17000 bytes each.
- what are the 8 buffers used for? how come its 8 buffers (one per hci
connection handle plus one spare)?
- what would be the impact of of drastically reducing the number of
hci_in_buffers, the size of the buffer (to say less than 1K), or both?
would that imply reducing maximum transfer units (MTUs) to less than the
default, e.g. 48bytes versus 672bytes for l2cap?
- is the hci flow control implemented in the stack (part h:1, section 3
"hci flow control", p 529)? would i have to?
- there is a chunk of 2K being dynamically allocated into bt_buf.head in
btmem_init() (btmem.c:100). can that be reduced?
- are there any large auto variables i have overlooked? does somebody
have a rough idea how big the program stack gets. do you know how to
i'd be grateful for some comments and answers!
Oliver Kasten phone: +41/ 1/ 63-2 06 63
ETH-Zurich fax: +41/ 1/ 63-2 16 59
Haldeneggsteig 4, IFW D48.1 email: firstname.lastname@example.org
CH-8092 Zuerich, Switzerland http://www.inf.ethz.ch/~kasten/
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to email@example.com