<?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/"
	>

<channel>
	<title>EmbLogic &#187; Pankaj Pandey</title>
	<atom:link href="https://www.emblogic.com/blog/author/pankaj-pandey/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Memory allocation technique</title>
		<link>https://www.emblogic.com/blog/12/memory-allocation-technique/</link>
		<comments>https://www.emblogic.com/blog/12/memory-allocation-technique/#comments</comments>
		<pubDate>Wed, 16 Dec 2015 11:59:51 +0000</pubDate>
		<dc:creator><![CDATA[Pankaj Pandey]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13071</guid>
		<description><![CDATA[Hi , Lets discuss about memory allocation techniques we use either in user space program or kernel space program . 1. Malloc :- void *malloc(size_t size); The malloc() function allocates size bytes and returns a pointer to the allocated memory.  &#8230; <a href="https://www.emblogic.com/blog/12/memory-allocation-technique/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Hi ,</p>
<p>Lets discuss about memory allocation techniques we use either in user space program or kernel space program .</p>
<p>1. Malloc :-</p>
<p>void *malloc(size_t size);<br />
The malloc() function allocates size bytes and returns a pointer to the<br />
allocated memory.  The memory is not initialized.  If size is  0,  then<br />
malloc()  returns either NULL, or a unique pointer value that can later<br />
be successfully passed to free().</p>
<p>2. Kmalloc</p>
<p>void *kmalloc(size_t size , flage);</p>
<p>Kmalloc allocates memory from kernel space and returns a pointer to the allocated memory .kmalloc allocated physically contiguous memory . if kernel doesn&#8217;t find contiguous memory of required size then this call fails .</p>
<p>3. vmalloc</p>
<p>void * vmalloc(size_t size);</p>
<p>vmalloc allocates virtually contiguous memory not necessary to be physically contiguous .vmalloc is a slower operation (slower because it makes an extra table to map the contiguous virtual memory to non-contiguous physical memory) . vmalloc is used when we need a large memory from kernel space .</p>
<p>Thank you &#8230;&#8230;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/memory-allocation-technique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
