Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

From the section 2.7 of the book - The Linux programing Interface named Process memory layout :

Data is defined as the

static variables used by the program.

What is the significance of the word static here ? I am aware of what static variables are in Java but I can not relate that meaning in this context .

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Static variables are variables that exist throughout the lifetime of the program. That is, they are placed in memory allocated at compile time (as opposed to most variables, which are allocated at run time).

share|improve this answer

This does not have an exact parallel in Java, but it is somewhat like static final properties of a class that are set in their definition.

C "const" constants are translated to "Data" in programs layout.

However, a write limitation doesn't necessarily exists in the machine code in the case of data, unlike in cases of constants or final variables.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.