process.memory() in console: JSON?

Posted on
  • Picking a Pico from my stash of Espruino boards, I picked a 1v92 flashed one... what a great release this was, like the 1v96. Updated to 2.v06 and for obvious reason and curiosity I noticed two things:

    1. The image selection dialog pop-up looks not that user friendly (anymore): the width is too narrow to show the drop-down box arrow. Some image short description text is so long that user has to scroll top the far right to get to it. Not a big deal, but is just not looking confidence fostering (see attached screenshot).

    2. For curiosity, I checked / compared process.memory():

      • 1v92 shows nice JSON in console
      • 2v06 shows something mixed
        Where is the difference coming from?

    1v92:

    >process.memory()  // 1v92
    ={ "free": 5076, "usage": 24, "total": 5100, "history": 9,
      "stackEndAddress": 536958124,
      "flash_start": 134217728, "flash_binary_end": 376720,
      "flash_code_start": 134234112, "flash_length": 393216 }
    

    2v06:

    >process.memory() // 2v06
    ={ free: 5076, usage: 24, total: 5100, history: 7,
      gc: 0, gctime: 5.54466247558, blocksize: 16,
      "stackEndAddress": 536958184,
      flash_start: 134217728, "flash_binary_end": 386528,
      "flash_code_start": 134234112, flash_length: 393216 }
    

    1 Attachment

    • flashImageSelectionDialog.png
  • Thanks! I just fixed the IDE flasher size issue - it should go live next time I push an update to the website.

    New builds should have the quoting issue fixed too - in order to quote correctly Espruino needed to check if the field name was a valid JS ID - the function to do that expected a C string and I'd made the buffer size for it 16 - so any variable name longer than 15 chars was just kept quoted, hence the ugliness :)

  • Great. Thanks for the fix and feedback.

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

process.memory() in console: JSON?

Posted by Avatar for allObjects @allObjects

Actions