Why is this getting out of memory?

Posted on
  • I've just flashed an Olimexino-STM32 board with the 1.60 version. Blinking LED's are working fine, but the code below produces an out of memory error when x=220, I've tried to rewrite the JavaScript in several ways, without luck.

    It doesn't make much sense to me, but an unqualified guess would be that the strings produced in the console.log statement are not being released.

    var i=0;
    
    function Testing() {
            console.log(i);
            i++;
            // No effect
            process.memory();
    }
    
    for (var x=0; x<1000; x++)
            Testing();
    
  • Downgrading from the build of 2014-04-02 to the 2014-03-31 build solved the problem.

  • Ahh - yes, some big changes went in the repository a few days ago and caused some regressions. That issue was fixed yesterday though, so if you try the build for 2014-04-03 you'll probably find that it's fine.

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

Why is this getting out of memory?

Posted by Avatar for kpe @kpe

Actions