Skip to content

Commit 3059673

Browse files
Copy ESP8266 String w/SSO to ESP32 repo
I redid the ESP8266 WString library to enable small string optimization (SSO) a while back, and think it would be helpful even on the ESP32 with its higher memory complement. SSO avoids lots of tiny mallocs() on the heap which cause fragmentation by using the memory in the class object itself to store the actual string and only mallocing() for buffers that are larger than what can fit in thie class object. Modern C++ std::string implementations have this optimization as well, but since we're using Arduino strings we had to roll our own.
1 parent a0ad987 commit 3059673

File tree

2 files changed

+646
-714
lines changed

2 files changed

+646
-714
lines changed

0 commit comments

Comments
 (0)