linker error: DRAM overflow
Posted: Wed Nov 06, 2019 1:26 pm
Currently while linking (in platformIO), I'm getting the following linker errors:
From reading some otherr threads, it seems that this happens if the code somewhere mallocs too many bytes (please correct me).
My questions though:
1. How can this even be determined during linking whether the allocation is too big?
2. Why is this an error? afaik trying to malloc too much memory is perfectly fine and one just gets back a nullptr, no?
Code: Select all
ld.exe: .pio\build\esp32cam\firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
ld.exe: DRAM segment data does not fit.
ld.exe: region `dram0_0_seg' overflowed by 469400 bytes
My questions though:
1. How can this even be determined during linking whether the allocation is too big?
2. Why is this an error? afaik trying to malloc too much memory is perfectly fine and one just gets back a nullptr, no?