[2nd Heap] Disable using 2nd heap for non-String objects

See discussion: https://github.com/letscontrolit/ESPEasy/pull/3680#issuecomment-1026522467
This commit is contained in:
TD-er
2022-02-03 10:30:06 +01:00
parent 084b83a5fd
commit a3e8e8fbfa
5 changed files with 10 additions and 9 deletions
+2 -1
View File
@@ -1443,7 +1443,8 @@ void createRuleEvents(struct EventStruct *event) {
if (!validDeviceIndex(DeviceIndex)) { return; }
#ifdef USE_SECOND_HEAP
HeapSelectIram ephemeral;
// HeapSelectIram ephemeral;
// TD-er: Disabled for now, suspect for causing crashes
#endif
+2 -1
View File
@@ -352,7 +352,8 @@ bool PluginCall(uint8_t Function, struct EventStruct *event, String& str)
if (validPluginID(DeviceIndex_to_Plugin_id[x])) {
if (Function == PLUGIN_DEVICE_ADD) {
#ifdef USE_SECOND_HEAP
HeapSelectIram ephemeral;
//HeapSelectIram ephemeral;
// TD-er: Disabled for now, as it is suspect for crashes.
#endif
if ((deviceCount + 2) > static_cast<int>(Device.size())) {
-4
View File
@@ -646,10 +646,6 @@ String LoadStringArray(SettingsType::Enum settingsType, int index, String string
tmpString.reserve(bufferSize);
{
#ifdef USE_SECOND_HEAP
HeapSelectIram ephemeral;
#endif
while (stringCount < nrStrings && static_cast<int>(readPos) < max_size) {
const uint32_t readSize = std::min(bufferSize, max_size - readPos);
result += LoadFromFile(settingsType,
+4 -2
View File
@@ -244,7 +244,8 @@ void checkUDP()
#endif // ifndef BUILD_NO_DEBUG
{
#ifdef USE_SECOND_HEAP
HeapSelectIram ephemeral;
// HeapSelectIram ephemeral;
// TD-er: Disabled for now as it is suspect for crashes.
#endif
Nodes[unit].age = 0; // Create a new element when not present
@@ -524,7 +525,8 @@ void sendSysInfoUDP(uint8_t repeats)
{
#ifdef USE_SECOND_HEAP
HeapSelectIram ephemeral;
// HeapSelectIram ephemeral;
// TD-er: disabled for now as it is suspect for crashes.
#endif
Nodes[Settings.Unit].age = 0; // Create new node when not already present.
+2 -1
View File
@@ -230,7 +230,8 @@ void WiFi_AP_CandidatesList::loadCandidatesFromScanned() {
if (scanned_new.size() > 0) {
// We have new scans to process.
#ifdef USE_SECOND_HEAP
HeapSelectIram ephemeral;
// HeapSelectIram ephemeral;
// TD-er: Disabled for now as it is suspect for crashes
#endif
purge_expired();
for (auto scan = scanned_new.begin(); scan != scanned_new.end();) {