Questions tagged [heap]
3 questions
12
votes
6 answers
Using String instead of C string, yet another attempt to touch a loaded issue
I've been reading a lot over the years why we should not use the notorious String class and how heap fragmentation is bad practice and not professional and we should never use it in our programs or we'll never enter the C hall of fame and get to be…
Nino
- 411
- 4
- 9
0
votes
2 answers
Is std::string (and ephemeral memory allocation in general) safe to use for ESP32 Arduino?
I know that with 8-bit AVR Arduinos, std::string is widely regarded as fundamentally unsafe due to problems with heap-fragmentation (partly due to limited ram, and partly because the WAY the underlying Arduino/AVR library manages memory is more…
Bitbang3r
- 561
- 1
- 3
- 14
0
votes
1 answer
ESP32 heap problem
I wrote a simple C++ program (just main.cpp and corresponding platform.io files & libraries) to get BME280 sensor readings. It worked fine until I decided to use good programming practices, using header files and separating the read function from…