zephyr.js icon indicating copy to clipboard operation
zephyr.js copied to clipboard

Optimize UUID allocation in BLE code

Open grgustaf opened this issue 9 years ago • 1 comments

Some testing @jimmy-huang and I did revealed that nine 4-byte UUIDs are allocated in the BLE code for one of our samples (see PR #191). Each we think is using a 64-byte minimum malloc block, so ~576 bytes are used up. We could do better with a mini-allocator for 4-byte blocks. We might be able to use an existing Zephyr memory pool feature or could write our own simple thing, but possibly worth looking into if we're seeing memory pressure. Right now ROM seems like the bigger concern.

grgustaf avatar Sep 23 '16 00:09 grgustaf

@jimmy-huang did we address this somehow or are we still making multiple allocs for these tiny UUIDs?

grgustaf avatar Dec 05 '16 18:12 grgustaf