Hi Dave,<br>Thank you for your help !<br>Does it mean that I could use all of the memory my computer has? But one of my classmates told me that kernel could only use 1G from a 4G memory.computer...Is there anything I have misunderstood ?<br>


<br><br><div class="gmail_quote">On Fri, Nov 11, 2011 at 4:58 AM, Dave Hylands <span dir="ltr">&lt;<a href="mailto:dhylands@gmail.com" target="_blank">dhylands@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi,<br>
<div><br>
On Thu, Nov 10, 2011 at 6:23 AM, Geraint Yang &lt;<a href="mailto:geraint0923@gmail.com" target="_blank">geraint0923@gmail.com</a>&gt; wrote:<br>
&gt; Hi there,<br>
&gt; I am a newbie to Linux kernel programming. I am going to make a module<br>
&gt; which will cost much memory in kernel, I just want to know how much<br>
&gt; memory I can get by calling memory allocate API in kernel.<br>
<br>
</div>All of it.<br>
<br>
>From kernel space, you can completely exhaust memory to the point of<br>
making your system unusable.<br>
<br>
>From kernel space you have vmalloc memory and kmalloc memory (plus a<br>
couple other memory spaces). Depending on how things are configured,<br>
it&#39;s possible to exhaust vmalloc memory even though there is memory<br>
available to be kmalloc&#39;d.<br>
<span><font color="#888888"><br>
--<br>
Dave Hylands<br>
Shuswap, BC, Canada<br>
<a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div style="text-align:left">Geraint Yang <br>Tsinghua University Department of Computer Science and Technology</div>
<div><br></div><br>