Skip to content

Commit f42327d

Browse files
authored
doc: gcc handles duplicate literal strings (#7531)
1 parent e2b8f6a commit f42327d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/reference.rst

+9-4
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,17 @@ Progmem
247247

248248
The Program memory features work much the same way as on a regular
249249
Arduino; placing read only data and strings in read only memory and
250-
freeing heap for your application. The important difference is that on
251-
the ESP8266 the literal strings are not pooled. This means that the same
252-
literal string defined inside a ``F("")`` and/or ``PSTR("")`` will take
253-
up space for each instance in the code. So you will need to manage the
250+
freeing heap for your application.
251+
252+
In core versions prior to 2.7, the important difference is that on the
253+
ESP8266 the literal strings are not pooled. This means that the same
254+
literal string defined inside a ``F("")`` and/or ``PSTR("")`` will take up
255+
space for each instance in the code. So you will need to manage the
254256
duplicate strings yourself.
255257

258+
Starting from v2.7, this is no longer true: duplicate literal strings within
259+
r/o memory are now handled.
260+
256261
There is one additional helper macro to make it easier to pass
257262
``const PROGMEM`` strings to methods that take a ``__FlashStringHelper``
258263
called ``FPSTR()``. The use of this will help make it easier to pool

0 commit comments

Comments
 (0)