constrained ram
Posted: Mon Jan 17, 2022 11:35 pm
I've got a 29kb update text file in ram on a Lolin D32 board with 100k of ram. When I try to access the first 30 characters with update[:30] I get a memory error
Well that's mostly what happens, sometimes the repl just prints the first line of the program. But lack of ram seems to be the problem.
Is there a way to access the first 30 characters without running out of ram? I tried writing the file to flash (to preserve it) & then recycling the update variable with update=update[:30] but still got the memory error.
Code: Select all
line 102 MemoryError: memory allocation failed, allocating 19694 bytes
Is there a way to access the first 30 characters without running out of ram? I tried writing the file to flash (to preserve it) & then recycling the update variable with update=update[:30] but still got the memory error.