Memory and Code sizes?

Hello,

  1. I hastly was blended by the 24kB SRAM size! But attention this is not the RAM size!
    Is it correct that the curie uC does have only ~<8kB RAM.
    A first malloc test brought me only upto 7136 Byte RAM - really!?
    What is the nominal RAM figure? Is there away tho determine the free memory by a API function?

  2. I have mentioned that same source code (Blink example) compiled for Genuino 101 does result in a code size of about 29.994 Byte while for UNO the code size is 1.030 Byte. Does this relate to a linked in BLE peripheral stack?

I have a sketch that I've run on Mega 2560, Due, and Galileo. But I seem to be running out of stack on the 101.

Using avr-size.exe like described here, I should have about 4k of RAM remaining after data & bss. And my sketch runs fine with less than 1k remaining on the Mega 2560.

For comparison, I get these sizes for Blink.ino on different boards:

Board      text    data     bss     dec     hex filename
101:      14040    3168   12668   29876    74b4 Blink.ino.elf
Mega2560: 11692       0    2540   14232    3798 Blink.ino.elf
Due:       1554       0       9    1563     61b Blink.ino.elf
Galileo:  28130   27892    1968   57990    e286 Blink.ino.elf

So I guess the 101 is using up 15k+ of RAM just for the core environment? Leaving me only about 8.5k for my sketch?

The Galileo uses even more, but that's not a problem because it has tons of RAM. Is this an unavoidable thing with Intel? Or is there a chance that later cores will improve this?

I'm going to try wading through the map file to look for clues what I can whittle down. But I have another application that is even more memory hungry, which I would like to use the 101 for.