<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mukesh Chauhan</title>
	<atom:link href="http://mukeshchauhan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mukeshchauhan.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 29 Jul 2011 01:31:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mukeshchauhan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/1d79fdadc21477551d06f698666beaa4?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Mukesh Chauhan</title>
		<link>http://mukeshchauhan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mukeshchauhan.wordpress.com/osd.xml" title="Mukesh Chauhan" />
	<atom:link rel='hub' href='http://mukeshchauhan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Show callstack from the C program</title>
		<link>http://mukeshchauhan.wordpress.com/2011/07/27/show-callstack/</link>
		<comments>http://mukeshchauhan.wordpress.com/2011/07/27/show-callstack/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 02:43:19 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=124</guid>
		<description><![CDATA[Dear all, I am currently working to show call stack of the current thread from the code itself. For this purpose, I am analyzing StackWalk64 and CaptureStackBackTrace windows API. I will update the post once I get through it. Though, external utilities can also be used. user dump of the process can be taken to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=124&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear all,</p>
<p>I am currently working to show call stack of the current thread from the code itself. For this purpose, I am analyzing <a href="http://msdn.microsoft.com/en-us/library/ms680650%28v=vs.85%29.aspx" target="_blank">StackWalk64</a> and <a href="http://msdn.microsoft.com/en-us/library/bb204633%28v=vs.85%29.aspx" target="_blank">CaptureStackBackTrace</a> windows API. I will update the post once I get through it.</p>
<p>Though, external utilities can also be used. user dump of the process can be taken to see the call stack. Solaris (and linux) has <a href="http://linuxcommand.org/man_pages/pstack1.html" target="_blank">pstack</a> command which is very excellent utility.</p>
<p>Please leave a comment if you have more information regarding this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=124&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2011/07/27/show-callstack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>coreadm &#8211; core file administration</title>
		<link>http://mukeshchauhan.wordpress.com/2011/07/22/coreadm-core-file-administration/</link>
		<comments>http://mukeshchauhan.wordpress.com/2011/07/22/coreadm-core-file-administration/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 06:05:21 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=120</guid>
		<description><![CDATA[Coreadm utility is used to set various options for generating core on Solaris system. Sometimes, core file is not generated for a process which has setid bit enabled. Use following command to enable the core generation for such processes - coreadm -e proc-setid Please see here for more options to use with coreadm.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=120&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Coreadm utility is used to set various options for generating core on Solaris system.</p>
<p>Sometimes, core file is not generated for a process which has setid bit enabled. Use following command to enable the core generation for such processes -</p>
<p><code>coreadm -e proc-setid</code></p>
<p>Please see <a href="http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?coreadm+1" target="_blank">here </a>for more options to use with coreadm.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=120&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2011/07/22/coreadm-core-file-administration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Difference between paged pool and nonpaged pool memory</title>
		<link>http://mukeshchauhan.wordpress.com/2011/07/14/difference-between-paged-pool-and-nonpaged-pool-memory/</link>
		<comments>http://mukeshchauhan.wordpress.com/2011/07/14/difference-between-paged-pool-and-nonpaged-pool-memory/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 01:49:12 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=116</guid>
		<description><![CDATA[Windows divides the kernel mode address space into paged and nonpaged memory pools. The paged memory can be swapped out and nonpaged memory is never swapped out. Device drivers are usually not paged. For example, interrupt routine must be in nonpaged memory because interrupt can occur anytime. Paged pool can be allocated and accessed at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=116&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Windows divides the kernel mode address space into paged and nonpaged memory pools. The paged memory can be swapped out and nonpaged memory is never swapped out. </p>
<p>Device drivers are usually not paged. For example, interrupt routine must be in nonpaged memory because interrupt can occur anytime. Paged pool can be allocated and accessed at IRQL &lt; DISPATCH_LEVEL.</p>
<p>For more information, please visit this <a href="http://blogs.technet.com/b/markrussinovich/archive/2009/03/26/3211216.aspx" target="_blank">blog</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=116&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2011/07/14/difference-between-paged-pool-and-nonpaged-pool-memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>FSUTIL &#8211; Create a file of specified size</title>
		<link>http://mukeshchauhan.wordpress.com/2011/07/01/fsutil-create-a-file-of-specified-size/</link>
		<comments>http://mukeshchauhan.wordpress.com/2011/07/01/fsutil-create-a-file-of-specified-size/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 06:42:31 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=114</guid>
		<description><![CDATA[Windows utility &#8220;fsutil&#8221; can be used to create a file of certain size. Fsutil file createnew For example: fsutil file createnew C:\file_100MB.dat 104857600 will create a 100MB file (104,857,600B = 100MB) named “file_100MB.dat” in C drive.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=114&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Windows utility &#8220;fsutil&#8221; can be used to create a file of certain size.</p>
<p><code>Fsutil file createnew</code></p>
<p>For example:</p>
<p><code>fsutil file createnew C:\file_100MB.dat 104857600</code><br />
will create a 100MB file (104,857,600B = 100MB) named “file_100MB.dat” in C drive.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=114&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2011/07/01/fsutil-create-a-file-of-specified-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Disable structure padding in C</title>
		<link>http://mukeshchauhan.wordpress.com/2011/07/01/disable-structure-padding-in-c/</link>
		<comments>http://mukeshchauhan.wordpress.com/2011/07/01/disable-structure-padding-in-c/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 06:39:56 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=110</guid>
		<description><![CDATA[Following is the way to disable structure padding using pragma in C. #pragma pack(push, 1) //Define your structure here #pragma pack(pop) //Structure padding is re enabled. More information can be found at MSDN. GCC follows the same specifications.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=110&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following is the way to disable structure padding using pragma in C.</p>
<p><code>#pragma pack(push, 1)<br />
//Define your structure here<br />
#pragma pack(pop)<br />
//Structure padding is re enabled.</code></p>
<p>More information can be found at <a href="http://msdn.microsoft.com/en-us/library/2e70t5y1%28VS.80%29.aspx" target="_blank">MSDN</a>. GCC follows the same specifications. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=110&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2011/07/01/disable-structure-padding-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Watch out</title>
		<link>http://mukeshchauhan.wordpress.com/2011/07/01/watch-out/</link>
		<comments>http://mukeshchauhan.wordpress.com/2011/07/01/watch-out/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 06:36:26 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=107</guid>
		<description><![CDATA[Ever been in the situation where you want to run the command continuously without writing a shell script for it. Watch is used to run a command to run at regular intervals. The basic syntax of the command is watch [options] command For example - watch -n 10 ls -l will execute ls -l command [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=107&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever been in the situation where you want to run the command continuously without writing a shell script for it.</p>
<p>Watch is used to run a command to run at regular intervals. The basic syntax of the command is<br />
<span id="more-107"></span><br />
watch [options] command</p>
<p>For example -</p>
<p>watch -n 10 ls -l will execute ls -l command every 10 seconds.</p>
<p>watch -d ls -l home will watch for content changes in the directory home.</p>
<p>Looks pretty interesting. See man pages for more options.</p>
<p>Happy watching. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=107&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2011/07/01/watch-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Casting malloc</title>
		<link>http://mukeshchauhan.wordpress.com/2010/05/30/casting-malloc/</link>
		<comments>http://mukeshchauhan.wordpress.com/2010/05/30/casting-malloc/#comments</comments>
		<pubDate>Sun, 30 May 2010 12:35:00 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=101</guid>
		<description><![CDATA[Originally, the C language did not enjoy the void pointer. In those dark ages the char pointer was used as a generic pointer, so the definition of malloc looked something like this: char *malloc(size) int size; Of course, this tended to cause problems when trying to assign a char pointer to, say, a double pointer. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=101&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Originally, the C language did not enjoy the void pointer. In those dark ages the char pointer was used as a generic pointer, so the definition of malloc looked something like this:</p>
<p>char *malloc(size)<br />
int size;</p>
<p>Of course, this tended to cause problems when trying to assign a char pointer to, say, a double pointer. Because of this a cast was required:<br />
<span id="more-101"></span><br />
double *p;<br />
p = (double *)malloc ( n * sizeof ( double ) );</p>
<p>However, with the advent of the ISO C standard a new generic pointer was created, the void pointer. A void pointer can be assigned to any pointer type (except function pointers) safely and without the need for a cast. Thanks to this, the calls to malloc were simplified:</p>
<p>double *p;<br />
p = malloc ( n * sizeof ( double ) );</p>
<p>However, many still prefer to cast malloc because they feel it makes the intentions of the memory allocation more clear. There is nothing wrong with this except in the event that stdlib.h, the header which declares malloc, is not included. If the return of malloc is cast then the error which would be flagged is hidden, resulting in a difficult to find bug. Also, during maintenance, if the type of the pointer changes but the cast is not changed, once again there is a difficult to find bug. The method most experienced programmers choose is:</p>
<p>p = malloc ( n * sizeof *p );</p>
<p>There is no cast for malloc since there is no need for one, and instead of using sizeof ( type ) to determine the size of the block, sizeof *ptr is used. By dereferencing the pointer and taking its size, the proper value is given without having to worry about modifying the allocation request if the type of the pointer changes.</p>
<p>So should you cast malloc? No, that is the preferred method. However, you should use whichever you like provided you are aware of the issues.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=101&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2010/05/30/casting-malloc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Bang bang!!!</title>
		<link>http://mukeshchauhan.wordpress.com/2010/04/16/bang-bang/</link>
		<comments>http://mukeshchauhan.wordpress.com/2010/04/16/bang-bang/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 17:42:06 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=99</guid>
		<description><![CDATA[One reason people hate using command line is if something goes wrong or has to rerun the command, they have to type it all over again. Some use up arrow instead of retyping. But here is bang command typed as (!) exclamation, for your rescue. &#8220;Bang&#8221; (!) is a very interesting command. It is very [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=99&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One reason people hate using command line is if something goes wrong or has to rerun the command, they have to type it all over again. Some use up arrow instead of retyping. But here is bang command typed as (!) exclamation, for your rescue.<br />
<span id="more-99"></span><br />
&#8220;Bang&#8221; (!) is a very interesting command. It is very useful and can speed up your work. It saves your effort to type the commands again again. </p>
<p># !!<br />
This bang command, when entered into the bash shell will run the previous command. It does the same thing as hitting the up arrow to take you to the previous command and then hitting enter.</p>
<p># !ls<br />
This will run the last command that started with ‘ls’. If you ran ‘ls -al /etc/init.d’ a few commands ago and then you type ‘!ls’ the full command will be run again, assuming that you haven’t used that command since then.</p>
<p># !ls:p<br />
This will display the command instead of running it.</p>
<p># !$<br />
This one will run the last word of the previous command. This one is mainly useful for substitutions.</p>
<p># !$:p<br />
Instead of running the last word of the previous command this will print it out.</p>
<p># !*<br />
This bang command will run the previous command without the first word. This one is also only really useful for substitutions as we see in the examples that follow.</p>
<p># !*:p<br />
This will print the previous command without the first word.</p>
<p><a href="http://mail.linux.ie/pipermail/ilug/2006-May/087799.html">Click here</a> for examples.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=99&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2010/04/16/bang-bang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Fedora 12 installation hangs on Dell laptop</title>
		<link>http://mukeshchauhan.wordpress.com/2010/02/13/fedora-12-installation-hangs-on-dell-laptop/</link>
		<comments>http://mukeshchauhan.wordpress.com/2010/02/13/fedora-12-installation-hangs-on-dell-laptop/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 14:05:25 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=97</guid>
		<description><![CDATA[I was trying to install Fedora 12 on my system. I have Dell Vostro 1015 with 2 GB RAM. The installation hangs after running for some time. It does not hang at one particular place. I tried 3 or 4 times and every time it hanged at different places. After going through their bug list, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=97&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was trying to install Fedora 12 on my system. I have Dell Vostro 1015 with 2 GB RAM. The installation hangs after running for some time. It does not hang at one particular place. I tried 3 or 4 times and every time it hanged at different places. </p>
<p>After going through their bug list, I found a bug about my problem. To see the bug information, go to <a href="https://bugzilla.redhat.com/show_bug.cgi?id=538911">bug</a>. </p>
<p>They have given a work around which did not work for me but it did work for some people.</p>
<p>Update (01-Jul-2011):<br />
This seems to be a known bug. Even, I have faced the same issue with FC14 also. Now, I am using Kubuntu and installed FC14 on Virtual Box in windows. So far so good for me. I wish they could resolve this issue.</p>
<p>Please see below link for the details on the bug <a href="http://fedoraproject.org/wiki/Common_F14_bugs#Anaconda_fails_to_modify_NTFS_partition">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=97&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2010/02/13/fedora-12-installation-hangs-on-dell-laptop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Gustavo Duarte’s Linux Internals Series</title>
		<link>http://mukeshchauhan.wordpress.com/2009/08/25/gustavo-duarte%e2%80%99s-linux-internals-series/</link>
		<comments>http://mukeshchauhan.wordpress.com/2009/08/25/gustavo-duarte%e2%80%99s-linux-internals-series/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 12:14:06 +0000</pubDate>
		<dc:creator>Mukesh Chauhan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://mukeshchauhan.wordpress.com/?p=94</guid>
		<description><![CDATA[I have been reading Gustavo Duarte&#8217;s blog for last few days. The blog contains very good and neatly written contents on Linux internals. He has explained the things in the simplest manner using code and, especial mention to, excellent diagrams. I would definitely recommend you to read the blog series, if you are interested in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=94&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been reading <a href="http://duartes.org/gustavo/blog/">Gustavo Duarte&#8217;s blog</a> for last few days. The blog contains very good and neatly written contents on Linux internals. He has explained the things in the simplest manner using code and, especial mention to, excellent diagrams. </p>
<p>I would definitely recommend you to read the blog series, if you are interested in Linux internals.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mukeshchauhan.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mukeshchauhan.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mukeshchauhan.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mukeshchauhan.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mukeshchauhan.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mukeshchauhan.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mukeshchauhan.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mukeshchauhan.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mukeshchauhan.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mukeshchauhan.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mukeshchauhan.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mukeshchauhan.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mukeshchauhan.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mukeshchauhan.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mukeshchauhan.wordpress.com&amp;blog=6448299&amp;post=94&amp;subd=mukeshchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mukeshchauhan.wordpress.com/2009/08/25/gustavo-duarte%e2%80%99s-linux-internals-series/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db561d4a1edd6a0db2d0b3f07bf7bd52?s=96&#38;d=identicon" medium="image">
			<media:title type="html">Mukesh</media:title>
		</media:content>
	</item>
	</channel>
</rss>
