• Hi @Robin,

    Thanks, I tend to do most development using the IDE Emulator (since it's faster than the actual hardware) and I just discovered that my full app code I minified for Bangle.js v2 that works for the Bangle.js v1 emulator gets a strange error and doesn't run on my actual Bangle.js v1 hardware.

    By the way, I believe version 2v10 of the firmware somehow increased the amount of usable memory so here are the numbers I get on my real Bangle.js v1 after connecting and before loading anything:

    >process.env
    ={
      VERSION: "2v10",
      GIT_COMMIT: "63dafbf9f",
      BOARD: "BANGLEJS",
      FLASH: 524288, SPIFLASH: 4194304, HWVERSION: 1, STORAGE: 4194304, RAM: 65536,
      SERIAL: "8614df71-b4fb9fc0",
      CONSOLE: "Bluetooth",
      MODULES: "Flash,Storage,hea" ... "tensorflow,locale",
      EXPTR: 536882372 }
      
    >process.memory()
    ={ free: 1928, usage: 656, total: 2584, history: 11,
      gc: 27, gctime: 5.79833984375, blocksize: 13, stackEndAddress: 536925152, flash_start: 0,
      flash_binary_end: 450188, flash_code_start: 1610612736, flash_length: 524288 }
    >
    

    That's a good point about Espruino needing space for housekeeping. I've actually been very pleasantly surprised by how much I was able to do before I started running into out-of-memory problems at runtime. And I believe the Bangle.js v2 has 4x more memory so can't wait to receive mine!

  • Sat 2021.10.16

    This L14 blocksize: 13 raises a red flag for me. Don't know the answer, but I've only seen 16 or 12 on older boards.

    Was this somehow forced? @TTBangler   or an anomaly that's popped up using the emulator?

    http://www.espruino.com/Reference#t_l_pr­ocess_memory



    I'm also somewhat concerned about the actual char count in relation to the number of JsVars that are being reported in use. I've noticed that what I thought I understood (project years ago) and what seems to be occurring/reported now doesn't add up to what I believed at that time. In your case, file size is around twice what the actual JsVar usage appears to be. Will continue to monitor and realize the need to do more size/reservation calculations, Trace, debug, dump, flat string length, etc. in order to cement what is going on in memory, before the dreaded 'LOW_MEMORY' flag appears.

    http://www.espruino.com/Internals

  • @Robin,

    The values in my screenshot for post #22 came from the Web IDE connected to my Bangle.js v1. I actually never even noticed the blocksize before and haven't done anything I'm aware of to change the default value. 13 definitely seems like an odd number, though.

About

Avatar for Robin @Robin started