1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

8 Commits

Author SHA1 Message Date
david gauchard
2d1acfa9a4
add or improve some debug messages (#6508) 2019-09-12 16:08:52 +02:00
Allman-astyler
eea9999dc5 Revert "Allman now (#6080)" (#6090)
This reverts commit 98125f88605cd7e46e9be4e1b3ad0600dd5d2b51.
2019-05-14 00:09:54 +02:00
Allman-astyler
98125f8860 Allman now (#6080)
* switch restyle script for CI

* remove confirmation

* restyle with allman
2019-05-13 16:41:34 +02:00
Harald
a994b75d75 StreamString SSO bug (#6035)
With SSO implementation in String, StreamString::write generates wrong strings under some circumstances.
Reason is that String::len() returns strlen(sso_buf) if SSO=true but with newly written data (in StreamString::write) the null-termination missing at the time len() is called.
Furthermore, len() is called twice which is inefficient if SSO=true.

* Git ignore

* - StreamString fix

* Remove changes to gitignore

* Fix missing space for 0-terminator lost in conversion
2019-05-02 09:55:43 -07:00
Earle F. Philhower, III
7369133681
Small String Optimization (#5690)
Reduce String memory overhead from 24 bytes to 16 bytes by limiting the
maximum string length to <64Kbytes (which is larger than heap so no
effective problem).

Add Small String Optimization, SSO, which instead of allocating pointers
to small strings on the heap will store the string in place of the
pointer in the class.  This should reduce memory fragmentation as

Save up to 12 chars (11 + \0) in String itself by using the terminating
\0 in the inline string as a flag to identify if this is a SSO or a heap
string.

Add a host test that verifies that no memory is allocated until a
full 11 characters are assigned to a string, as well as checking all
intermediate values.

No user code changes should be required to work with this optimization.
2019-02-08 17:37:43 +00:00
Markus Sattler
50ad8ccdf5 rework StreamString::write to use String internal buffer direct.
#1289
2015-12-23 13:40:16 +01:00
George Talusan
70c85c0901 handle short writes 2015-12-22 21:31:30 -05:00
Markus Sattler
8b67051d1e add StreamString class (implement the Stream interface for String) 2015-11-25 12:33:33 +01:00