顯示具有 [C51/ARM][記憶體]記憶體配置:heap/stack/bss/data/text 標籤的文章。 顯示所有文章
顯示具有 [C51/ARM][記憶體]記憶體配置:heap/stack/bss/data/text 標籤的文章。 顯示所有文章

2016年12月2日 星期五

[C51/ARM] 記憶體配置:heap/stack/bss/data/text

此介紹是給在Keil C編譯器上使用8051(C51)和ARM.
(下列介紹由記憶體位置高排到低)

●heap
通常是給動態記憶配置(dynamic memory allocation)使用,需要programmer自己申請.

●stack
區域變數(local variable)
函式參數(function/method parameter)
函數的返回位址(function/method return address)
Keil官方手冊: 3.4 Stack use in C and C++

●bss (uninitialized data)

●data (initialized data)

●text code (text segment)
CPU instructions stored in here.