Page 1 of 1

"memory allocation failed, allocating 8192 bytes" error

Posted: Thu Dec 31, 2020 3:27 am
by kbrenner
Hi,

As a forewarning, I am novice with Micropython, so please be as explicit/thorough as possible with your recommendations/suggestions if you should have any :D .

I am using a PYBD-SF6W with a microSD card attached. I am trying to read in variables from some files on the microSD card; however, I am running into a memory allocation issue where I get the error:

"memory allocation failed, allocating 8192 bytes"

Is there a way to monitor how much memory is being used at any given time? Additionally, are there ways beyond running a gc.collect() to free up space in memory?

Thanks!

Re: "memory allocation failed, allocating 8192 bytes" error

Posted: Thu Dec 31, 2020 6:14 am
by pythoncoder
I suggest you read this doc which should answer your questions.