Which allocation scheme does ESP8266 RTOS SDK use?
by kacang bawang
I wanted to know which memory allocation scheme (heap_1.c, heap_2.c, heap_3.c, heap_4.c or heap_5.c) was used in the ESP8266 RTOS SDK. This is not mentioned anywhere in the docs (I’ve looked as of 1/12/16). What to do?
Let’s just take a look at what is compiled in then.
1 2 |
$ cd /path/to/RTOSSDK/lib $ xtensa-lx106-elf-nm libfreertos.a | grep -50 "T pvPortMalloc" |
Actually, this works even with a regular ‘nm’, hehe.
What do we see?
1 2 3 4 |
heap_4.o: ... 00000038 T pvPortMalloc ... |
Aha! heap_4.o means heap_4.c was used. ‘T’ means that this symbol is exported.