This blog moved to medium->https://medium.com/@cocoamaemae

Friday, September 8, 2017

Memory segment

Brief
Summarize memory segment

Basic memory segment
Nevertheless any languages, basic memory segment is like the below.

The roles of respective segments are like the below.

Stack segment
Contains stack. Stack is basically used for function calling. Nested functions are put in stack.

Heap segment
Contains heap. Heap is used for dynamic data which is not put in stack.

BSS segment
Contains uninitialized variables including static.
e.g.
int a;
static int a;

Data segment
Contains variables which have a pre-defined variables.
e.g.
int a = 8;
static int a = 8;
char String[] = "hoge";

Text segment
Contains mechanical languages. Data in this segment is always read only.




No comments:

Post a Comment

Front End Development Tools

TaskRunner Tool executing multiple tasks by only one execution. Tasks are like CSS preprocessor, Transpire, Module Bundler, etc... e.g. ...