> < ^ Date: Fri, 14 Nov 2003 15:41:15 +0100
< ^ From: Luca Giuzzi <giuzzi@dmf.bs.unicatt.it >
> < ^ Subject: Re: Maximum allocable memory

Dear Gap forum,

On Fri, Nov 14, 2003 at 10:00:48AM +0000, Steve Linton wrote:
> On Linux, the first problem that arises is that, when you compile GAP to
> dyanmically load shared libraries (the default) Linux seems to like to put
> them at about the 1GB mark in the address space. This causes the limitation
> which Bill Alombert reports. This can be avoided by compiling GAP to link
> libraries statically (the -static option to gcc, other things for other
> compilers). This allows up to 2GB (provided you have enough virtual memory) of
> workspace, or close to 3GB with the development version of GAP.

There are actually two things to consider in order to be able to use
more than 1Gb of RAM on linux. One, is that the kernel should (could)
be compiled with the CONFIG_HIGHMEM4G option in order to provide
access to high memory.

However this option does not change the amount of memory directly available to
user space program.
What has to be done is then to modify the boundary between kernel and
user space, since the dynamic linker takes care of mapping all the
shared libraries from there downwards (the ratio is usually 3:1)

Such buondary is determined by the the __PAGE_OFFSET macro.

In order to set it to set at approx. 2Gb it is needer to change its #define
in linux/include/asm/page.h to something like

#define __PAGE_OFFSET (0x80000000) 

and also alter the link address in arch/i386/vmlinux.lds to

.= 0x80000000 + 0x100000;

[or so the theory goes... now, if I only had a machine with 2Gb of
RAM on which to test it... :) ]


> < [top]