mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
doc: gcc handles duplicate literal strings (#7531)
This commit is contained in:
parent
e2b8f6acfb
commit
f42327da34
@ -247,12 +247,17 @@ Progmem
|
||||
|
||||
The Program memory features work much the same way as on a regular
|
||||
Arduino; placing read only data and strings in read only memory and
|
||||
freeing heap for your application. The important difference is that on
|
||||
the ESP8266 the literal strings are not pooled. This means that the same
|
||||
literal string defined inside a ``F("")`` and/or ``PSTR("")`` will take
|
||||
up space for each instance in the code. So you will need to manage the
|
||||
freeing heap for your application.
|
||||
|
||||
In core versions prior to 2.7, the important difference is that on the
|
||||
ESP8266 the literal strings are not pooled. This means that the same
|
||||
literal string defined inside a ``F("")`` and/or ``PSTR("")`` will take up
|
||||
space for each instance in the code. So you will need to manage the
|
||||
duplicate strings yourself.
|
||||
|
||||
Starting from v2.7, this is no longer true: duplicate literal strings within
|
||||
r/o memory are now handled.
|
||||
|
||||
There is one additional helper macro to make it easier to pass
|
||||
``const PROGMEM`` strings to methods that take a ``__FlashStringHelper``
|
||||
called ``FPSTR()``. The use of this will help make it easier to pool
|
||||
|
Loading…
x
Reference in New Issue
Block a user