Try this command:

dmesg | grep Memory

For  me the output is:
[    0.000000] Memory: 2007408k/2051636k available (4678k kernel code, 42932k 
reserved, 2124k data, 668k init, 1142332k highmem)

Look here for more details:
https://bbs.archlinux.org/viewtopic.php?id=14412

~ Adheer

From: [email protected]
Date: Fri, 11 Nov 2011 13:28:53 +0800
Subject: Re: About kernel memory limit
To: [email protected]
CC: [email protected]; [email protected]

Thanks. 
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.



On Fri, Nov 11, 2011 at 1:15 PM, Dave Stevens <[email protected]> wrote:


Quoting Geraint Yang <[email protected]>:






Hi Dave,

Thank you for your help !

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 ?




I'm sitting in front of a Ubuntu box with 8G installed, uname -a shows:



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



so kernel 3 and free: shows

             total       used       free     shared    buffers     cached

Mem:       8192500    2907656    5284844          0     162060    1915540

-/+ buffers/cache:     830056    7362444

Swap:      7812092          0    7812092



so 2.9G of 8 in use



Dave












On Fri, Nov 11, 2011 at 4:58 AM, Dave Hylands <[email protected]> wrote:




Hi,



On Thu, Nov 10, 2011 at 6:23 AM, Geraint Yang <[email protected]>

wrote:

> Hi there,

> I am a newbie to Linux kernel programming. I am going to make a module

> which will cost much memory in kernel, I just want to know how much

> memory I can get by calling memory allocate API in kernel.



All of it.



>From kernel space, you can completely exhaust memory to the point of

making your system unusable.



>From kernel space you have vmalloc memory and kmalloc memory (plus a

couple other memory spaces). Depending on how things are configured,

it's possible to exhaust vmalloc memory even though there is memory

available to be kmalloc'd.



--

Dave Hylands

Shuswap, BC, Canada

http://www.davehylands.com










--

Geraint Yang

Tsinghua University Department of Computer Science and Technology










-- 

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.





-- John Kenneth Galbraith, in American Capitalism: The Concept of 
Countervailing Power







-- 
Geraint Yang 
Tsinghua University Department of Computer Science and Technology




_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies                   
                  
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to