Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendHeader & F() #4266

Closed
bstsoftorg opened this issue Jan 31, 2018 · 1 comment
Closed

sendHeader & F() #4266

bstsoftorg opened this issue Jan 31, 2018 · 1 comment

Comments

@bstsoftorg
Copy link

bstsoftorg commented Jan 31, 2018

Basic Infos

To the developers:
Initially encountered a problem when using sendHeader, but this is true of many places.
There is a shortage of memory. Once stood 2.3.0-rc2, decided to move to 2.4.0, which was better, but some places are still eating RAM.
Possible enclose strings in F(). And not only where I point out in other places too.

Hardware

Hardware: ESP-12F
Core Version: 2.3.0-rc2, 2.4.0

Description

ESP8266WebServer.cpp
Global variables used 41524 bytes (50%) of dynamic memory, leaving 40396 bytes for local variables.
_srealm = F("Login Required");
Global variables used 41508 bytes (50%) of dynamic memory, leaving 40412 bytes for local variables.

Global variables used 41524 bytes (50%) of dynamic memory, leaving 40396 bytes for local variables.
sendHeader("WWW-Authenticate", String() + F("Basic realm="") + _srealm + F("""));
Global variables used 41508 bytes (50%) of dynamic memory, leaving 40412 bytes for local variables.

ESP8266HTTPClient.cpp
Global variables used 41524 bytes (50%) of dynamic memory, leaving 40396 bytes for local variables.
if (!beginInternal(url, String(F("https")).c_str())) {
Global variables used 41508 bytes (50%) of dynamic memory, leaving 40412 bytes for local variables.

Global variables used 41524 bytes (50%) of dynamic memory, leaving 40396 bytes for local variables.
if (!beginInternal(url, String(F("http")).c_str())) {
Global variables used 41508 bytes (50%) of dynamic memory, leaving 40412 bytes for local variables.

@devyte
Copy link
Collaborator

devyte commented Feb 7, 2018

Closing via #4148 which already merged.

@devyte devyte closed this as completed Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants