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?
On some kernels (depends on configuration), the config is exported in /proc, try this:
You could 'grep' for anything else you'd like to know.
On Ubuntu 9.04:
Most Fedora distros include the config used to create the kernel vmimage, try something like this
This may also be true for Ubuntu and Debian distributions.
I found a useful summary of kernel mailing list discussion on this at http://www.spack.org/wiki/LinuxRamLimits