Srinivas Ramanan <srinivas.ramanan@gmail.com> 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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
As a guess, Linux kernel developers leverage the fact that low address values are illegal, thus a pointer handling error that generates a low address value triggers a trap which allows the programmer to know he screwed up. Using virtual memory segment zero makes those valid addresses and thus programming errors are more likely to slip through un-noticed. HTH Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.