"memory allocation failed, allocating 8192 bytes" error

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
kbrenner
Posts: 46
Joined: Mon Jan 20, 2020 8:05 pm

"memory allocation failed, allocating 8192 bytes" error

Post by kbrenner » Thu Dec 31, 2020 3:27 am

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!

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

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

Post by pythoncoder » Thu Dec 31, 2020 6:14 am

I suggest you read this doc which should answer your questions.
Peter Hinch
Index to my micropython libraries.

Post Reply