New interpreter error: LOW_MEMORY,MEMORY

Posted on
  • Sat 2018.09.22

    Anyone able to shed light on this apparent new warning:

    New interpreter error: LOW_MEMORY,MEMORY

    Attempting to retrieve modules from GitHub

    What are the trip points that provide this warning and what is the threshold I should be concerned about for this Pico. Is it one half of the Free space?

    >process.memory();
    ={ "free": 3413, "usage": 1687, "total": 5100, "history": 2055,
      "gc": 6, "gctime": 7.46250152587, "stackEndAddress": 536958468, "flash_start": 134217728, "flash_binary_end": 381336,
      "flash_code_start": 134234112, "flash_length": 393216 }
    >
    

    Note that the next module in sequence is not loaded when this warning is given.

  • Really need to see your code

  • Really need to see your code

    Absolutely.

    • LOW_MEMORY - memory is low enough that command history got deleted, Espruino had to do a Garbage Collection pass while running your code. This isn't the end of the world.
    • MEMORY - memory ran out, execution was halted.
  • Mon 2018.09.24

    'Really need to see your code - Absolutely'

    Gordon has a copy.


    Attempted to load three unminified deployed modules with three require() statements. That's it. The third module didn't get loaded. Not really gaining that much by using either Esprima or Closure compiler.

    re: 'LOW_MEMORY - memory is low enough'

    Still would like to know the threshold, is it like 'ten' percent remaining and if so, of what value? 'free' or 'total' perhaps? How should we gage this?

    How does one guard against this error without knowing what the limit is?

    I'd like some comfort in knowing I'm going to be able to squeeze in that which I'm working on. Otherwise, yet another design change, . . . or scrap it all.

  • @Gordon, how is Espruino handling circular references - through (nested) module requests - in IDE code uploader? - I'm sure you keep track of what is already uploaded so the nesting cannot get one in trouble. Just asking for confirmation.

  • Attempted to load three unminified deployed modules with three require() statements.

    Gordon has a copy.

    Where? You mean the moduleNeopixelInit.js code you pm'd me 3 weeks ago? And you're saying it hasn't changed at all since then? It had a bunch of issues which I'd hope that some of the questions we've spent ages answering over the last weeks would have allowed you to fix.

    Still would like to know the threshold

    There is no threshold. For LOW_MEMORY it completely ran out of memory and had to delete some of the command history to free some up. You could argue that you get that memory warning at around 50% though, given the command history is basically a copy of what you upload.

    how is Espruino handling circular references - through (nested) module requests

    Yes, it keeps track - so you don't end up with it filling memory with duplicate modules :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

New interpreter error: LOW_MEMORY,MEMORY

Posted by Avatar for Robin @Robin

Actions