Replies: 3 comments
-
I try |
Beta Was this translation helpful? Give feedback.
-
No memory leaks and you should debug and run long enough. Library was intensively all the time and long enough to confirm it works correctly. Please don't re-post in this similar topic if you can't be verified what is your problem root causes. The memory used by WiFi system tasks is dynamically allocated and deallocated which you can't trace all their usage. For library memory usage, it was managed property by managed class (for selecting internal/external heaps) and can guarantee that no memory leaks in the current version. |
Beta Was this translation helpful? Give feedback.
-
If you ran the library long enough e.g., days or month, you will find that the heap reduction from first running to the subsequent runnings is around 2.8k and never exceed this amount. Note that heap reduction was calculated during session opening. The memory reserved and released by system tasks causes the memory usage fluctuation. You can't compare the static memory allocation in non-WiFi usage e.g. parsing JSON, reading sensor value, string manipulation with this kind of WiFi and TCP client usages. |
Beta Was this translation helpful? Give feedback.
-
Serial.print("\nFree memory=");
Serial.println(ESP.getFreeHeap());
String message="bla bla bla"; //5kb
Serial.print("\nFree memory=");
Serial.println(ESP.getFreeHeap());
smtp.connect(&session)
MailClient.sendMail(&smtp, &message)
Serial.print("\nFree memory=");
Serial.println(ESP.getFreeHeap());
message="bla bla bla"; //10kb
Serial.print("\nFree memory=");
Serial.println(ESP.getFreeHeap());
smtp.connect(&session)
MailClient.sendMail(&smtp, &message)
Serial.print("\nFree memory=");
Serial.println(ESP.getFreeHeap());
message="bla bla bla"; //5kb
Serial.print("\nFree memory=");
Serial.println(ESP.getFreeHeap());
smtp.connect(&session)
MailClient.sendMail(&smtp, &message)
Serial.print("\nFree memory=");
Serial.println(ESP.getFreeHeap());
OUTPUT
Free memory=180000
startFree memory=175000
We put a variable 5kbFree memory=170000
-5kb!!!Free memory=165000
We put a variable 10kbFree memory=160000
-10kb!!!Free memory=165000
We put a variable 5kbFree memory=165000
Heap unchanged. But the email library took 10kb and does not return it.Beta Was this translation helpful? Give feedback.
All reactions