Program in memory : An insider’s look

Posted: March 1, 2013 in Technology
Tags: ,

Found this Article which presents a very good picture of how a program resides in memory while executing.
Highlights of the article:
segmentation fault by stack overflow
Following is a sample program
main()
{
main();
}

segmentation fault by accessing the text region
Following is a sample program
main()
{
char *p="kapil";
p[0]=1;
}

memory allocation using memory map instead of from heap

One will sure enjoy reading it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s