1

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?

4 Answers 4

7

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.

4

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
2

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.

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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