Re: Address space for user process

From: Richard B. Johnson
Date: Wed Jul 07 2004 - 09:52:17 EST


On Wed, 7 Jul 2004, Christoph Pleger wrote:

> Hello,
>
> I read that - at least in Kernel 2.4 - the amount of memory that can be
> addressed by a user process is limited to 3 GB, no matter how much
> virtual memory is present. Is it possible to raise that limit?
>
> Kind regards
> Christoph

Sure. Use two (or more) tasks. It is a per-process limit because
in Unix the kernel shares the processes address space. See
how your process is laid out by executing this:

#include <stdio.h>
extern char _start;
extern char _end;
char dat;
const char x[]="x";
int main()
{
char foo;
printf("start = %p\n", &_start);
printf(" main = %p\n", main);
printf(" data = %p\n", &dat);
printf("const = %p\n", x);
printf("stack = %p\n", &foo);
printf(" end = %p\n", &_end);
return 0;
}

Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/