Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Fail to manage properly the Free Memory on Sipy

    Scheduled Pinned Locked Moved Support & Troubleshooting
    1 Posts 1 Posters 25 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pevrard
      last edited by

      Good Day All,
      I've developed several python scripts around pytrack, one of it expecting to log the tracked GPS position. I'm using several _thread for this, however, i'm having some memory problems...
      In some circumstances it works, reload the Sipy.. and then suddenly a memory error occurs.. (even sometimes without modifying any scripts) - see below.
      I do understand the free memory information is not the only parameter to take into account, rather the max blk & free sz... however, i do not find a way to manage it properly...
      There must be something i'm doing wrong.. but... did not find it..
      Thanks for your kind help
      Regards
      Patrick

      Traceback (most recent call last):
      File "main.py", line 7, in <module>
      MemoryError: memory allocation failed, allocating 565 bytes
      Pycom MicroPython 1.18.3 [v1.8.6-849-d19c9e9] on 2019-09-15; SiPy with ESP32
      Type "help()" for more information.

      import('micropython').mem_info()
      stack: 768 out of 7168
      GC: total: 67008, used: 50656, free: 16352
      No. of 1-blocks: 524, 2-blocks: 73, max blk sz: 384, max free sz: 154

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • 1 / 1
      • First post
        Last post

      Pycom on Twitter

      Pycom