http://www.penninkhof.com/2015/03/how-t ... n-esp8266/
If you’re wondering what the ICACHE_FLASH_ATTR means in earlier example; it’s an instruction for the linker, indicating that the function should be stored in flash memory instead of RAM. It is generally advisable to prefix most functions with ICACHE_FLASH_ATTR in order to save RAM.
Given that Arduino sketches are not prefixed by ICACHE_FLASH_ATTR, are the code generated on Arduino IDE stored in RAM? If yes, wouldn't this be a waste of RAM and how to have it store in flash?