<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Try this command:<br><br>dmesg | grep Memory<br><br>For me the output is:<br>[ 0.000000] Memory: 2007408k/2051636k available (4678k kernel code, 42932k reserved, 2124k data, 668k init, 1142332k highmem)<br><br>Look here for more details:<br>https://bbs.archlinux.org/viewtopic.php?id=14412<br><br>~ Adheer<br><br><div><hr id="stopSpelling">From: geraint0923@gmail.com<br>Date: Fri, 11 Nov 2011 13:28:53 +0800<br>Subject: Re: About kernel memory limit<br>To: geek@uniserve.com<br>CC: dhylands@gmail.com; kernelnewbies@kernelnewbies.org<br><br>Thanks. <br>But I think that command 'free' just tell the memory used in kernel space and user space.It is still unknown to us that how much memory is used by kernel.<br><br><br><br><div class="ecxgmail_quote">On Fri, Nov 11, 2011 at 1:15 PM, Dave Stevens <span dir="ltr"><<a href="mailto:geek@uniserve.com">geek@uniserve.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex"><div class="ecxim">Quoting Geraint Yang <<a href="mailto:geraint0923@gmail.com">geraint0923@gmail.com</a>>:<br>
<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
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<br>
my classmates told me that kernel could only use 1G from a 4G<br>
memory.computer...Is there anything I have misunderstood ?<br>
</blockquote>
<br></div>
I'm sitting in front of a Ubuntu box with 8G installed, uname -a shows:<br>
<br>
Linux roger-System-Product-Name 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>
so kernel 3 and free: shows<br>
total used free shared buffers cached<br>
Mem: 8192500 2907656 5284844 0 162060 1915540<br>
-/+ buffers/cache: 830056 7362444<br>
Swap: 7812092 0 7812092<br>
<br>
so 2.9G of 8 in use<br>
<br>
Dave<div class="ecxHOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
On Fri, Nov 11, 2011 at 4:58 AM, Dave Hylands <<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>> wrote:<br>
<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On Thu, Nov 10, 2011 at 6:23 AM, Geraint Yang <<a href="mailto:geraint0923@gmail.com">geraint0923@gmail.com</a>><br>
wrote:<br>
> Hi there,<br>
> I am a newbie to Linux kernel programming. I am going to make a module<br>
> which will cost much memory in kernel, I just want to know how much<br>
> memory I can get by calling memory allocate API in kernel.<br>
<br>
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's possible to exhaust vmalloc memory even though there is memory<br>
available to be kmalloc'd.<br>
<br>
--<br>
Dave Hylands<br>
Shuswap, BC, Canada<br>
<a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
<br>
</blockquote>
<br>
<br>
<br>
--<br>
Geraint Yang<br>
Tsinghua University Department of Computer Science and Technology<br>
<br>
</blockquote>
<br>
<br>
<br></div></div><span class="ecxHOEnZb"><font color="#888888">
-- <br>
It is told that such are the aerodynamics and wing loading of the bumblebee that, in principle, it cannot fly...if all this be true...life among bumblebees must bear a remarkable resemblance to life in the United States.<br>
<br>
-- John Kenneth Galbraith, in American Capitalism: The Concept of Countervailing Power<br>
<br>
<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>
<br>_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</div>                                            </div></body>
</html>