MDBT42Q vars and heap

Posted on
  • To get details about vars I use process.memory().

    How to get detail about heap?

  • 0x20010000 - process.memory().stackEndAddress should give you an idea of stack size.

    Normal Espruino devices don't actually have a heap since they don't use malloc/free, so there's not normally any need :)

  • Ok, the reason is that I have no clue how much memory is need for loading all firmware and additional modules.

    Decide to remove some firmware module and reduced vars to 1700 and check the free stack size .....

    0x20010000 - process.memory().stackEndAddress
    =20264
    

    I can definitely bump vars up again a litte and load some mode JS modules like mqtt and oled and more :)

  • Yes - loading JS modules shouldn't affect the available memory you see there at all.

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

MDBT42Q vars and heap

Posted by Avatar for MaBe @MaBe

Actions