"Not enough memory available on the board"



  • Hello,

    When I run os.getfree('/flash'), it says there's 441 kb available. despite this, I suddenly get this error "An error occurred: Not enough memory available on the board. Synchronizing failed. Please reboot your device manually".
    The program I'm writing is not exceptionally huge, at all. I tried import gc and running gc.collect on boot, but that didn't help.

    I'm probably misunderstanding the issue at hand.. ?



  • @soren I do not know which program flags this error: "An error occurred: Not enough memory available on the board. Synchronizing failed. Please reboot your device manually". May atom+Pymakr plugin. But besides that:
    There is a difference between the free memory in the flash file system, which is reported by os.getfree("/flash"), and the RAM, which is reported by gc.free_mem(). gc.collect() only affects the RAM and performs a garbage collection there.
    The error message you flag sounds more like being caused by file system problems, and maybe it's not even the free area, which is the reason, but some other file related error, which is faulty reported as "out of free space", since that is the most common reason. You could try to use simple methods like ftp and terminal emulator to upload and run your files. The visibility of what's going on is much better in case of problems
    Errors allocating RAM are reported like: "MemoryError: memory allocation failed, allocating xxxx bytes".



  • so apparently, doing a hard-reset removes the issue for some time only for it to come back. So I would think I need to use gc.collect in my main loop as well, right?


Log in to reply
 

Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.