Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i386 Linux kernels can be configured for a 2, 3 or 4 GiB limit on virtual address space per process, AFAIK. Is there something I can query in /proc or elsewhere to tell how the currently-running kernel was configured?

Update: Thanks for the answers on how to query for 4G. Any way I can query for 2G vs 3G?

share|improve this question

4 Answers 4

up vote 7 down vote accepted

On some kernels (depends on configuration), the config is exported in /proc, try this:

$ zcat /proc/config.gz | grep -i "CONFIG_HIGHMEM"

You could 'grep' for anything else you'd like to know.

share|improve this answer

I found a useful summary of kernel mailing list discussion on this at http://www.spack.org/wiki/LinuxRamLimits

share|improve this answer

On Ubuntu 9.04:

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
$ uname -r
2.6.28-11-generic
$ grep -i "CONFIG_HIGHMEM4G" /boot/config-`uname -r`
CONFIG_HIGHMEM4G=y
share|improve this answer

Most Fedora distros include the config used to create the kernel vmimage, try something like this

$ cat /etc/redhat-release 
Fedora release 10 (Cambridge)
$ grep -i "CONFIG_HIGHMEM4G" /boot/config-`uname -r`
CONFIG_HIGHMEM4G=y

This may also be true for Ubuntu and Debian distributions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.