Re: map bss to addr zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, Aug 27, 2012 at 2:01 AM, Srinivas Ramanan <srinivas.ramanan@xxxxxxxxx> wrote:
Hi all,
This is an interview question.
"What is the implication of mapping BSS to the Virtual Memory Segment 0?"

 I was not able to find the answer from web. So posting here.
thanks,
srinivas

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Hi,

The bss section typically includes all uninitialized variables declared with the static keyword.
The zero page which  is a copy-on-write page that reads as zero is used to map the BSS segment. Any process referencing the zero page sees the page filled with zeos and if it tries to writes to the page, it ends up modifying a private copy. (LDD ch15. page 429)

Mulyadi,

Why it will generate a page fault later when process will tries to reference it, while it already has mapped with the zero page?


Sorry if i am wrong anywhere.
Ritesh
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux