public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: >3G Memory support
@ 2002-06-20  2:01 marc.miller
  2002-06-20  2:08 ` William Lee Irwin III
  0 siblings, 1 reply; 10+ messages in thread
From: marc.miller @ 2002-06-20  2:01 UTC (permalink / raw)
  To: devnull, linux-kernel

Hi

Support of 4G of RAM is a configuration option when you compile the kernel.  Is that setting turned on?  

I think it's in "General Options" when you do a "make menuconfig" (I don't have a machine up at the moment that I can check).  There are three options:  Less than 1G, 1G to less than 4G, and 4G or more.  That last option is the one you would want.  

If that's already enabled, hopefully one of the memory guys can pitch in...

Marc J. Miller
Server Software Alliance Manager
Software & Infrastructure Initiatives Team
AMD, Inc.

marc.miller@amd.com
1-800-538-8450 x43325

 -----Original Message-----
From: 	devnull@adc.idt.com [mailto:devnull@adc.idt.com] 
Sent:	Wednesday, June 19, 2002 3:30 PM
To:	linux-kernel@vger.kernel.org
Subject:	>3G Memory support

Hello All.

I have a PC with 4G of Memory and would like a process to be able to
address all 4G of memory.

I am running 2.4.13-ac8

The way i understand it is that linux shares the top 1G of process address
space with all processes on the system(so on systems with 4G is physical
addressability, it leaves 3G for each process).

>From the archives, i learnt that i need to modify __PAGE_OFFSET and change
it from the default  (0xC0000000).

Looking at /usr/src/linux/include/asm-i386/page.h

<<SNIP>>
/*
 * This handles the memory map.. We could make this a config
 * option, but too many people screw it up, and too few need
 * it.
 *
 * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
 * a virtual address space of one gigabyte, which limits the
 * amount of physical memory you can use to about 950MB.
 *
 * If you want more physical memory than this then see the
 *   CONFIG_HIGHMEM4G
 * and CONFIG_HIGHMEM64G options in the kernel configuration.
 */

<<END_OF_SNIP>>

When i compiled my kernel, i set CONFIG_HIGHMEM4G.

Does this mean that all my programs should be able to address 4G ?

If yes, i dont think it is working very well.

#include<stdio.h>
#include<sys/resource.h>
#include<unistd.h>
#include<sys/wait.h>
#include<stdlib.h>

main(int argc, char **argv)
{

        char    *n;
  int   size = 1073741000;
        unsigned int totalsize = 0;

        while(size > 1000)      {
                while(n=(char *) malloc(size))  {
                        bzero(n, size);
                        totalsize += size;
                }
//              usleep(999999) ;
                size = size / 2;
        }
        printf("Total size = %lu\n", totalsize);
}

The variable "totalsize" goes upto 3G only.

If seting CONFIG_HIGHMEM4G is not the way to proceed, could someone please
point me in the right direction.

Thanks for taking the time to read my email, and sorry about the long
post.

Best Regards,


/dev/null

devnull@adc.idt.com


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


^ permalink raw reply	[flat|nested] 10+ messages in thread
* >3G Memory support
@ 2002-06-19 22:30 devnull
  2002-06-20  3:29 ` Brian Gerst
  0 siblings, 1 reply; 10+ messages in thread
From: devnull @ 2002-06-19 22:30 UTC (permalink / raw)
  To: linux-kernel

Hello All.

I have a PC with 4G of Memory and would like a process to be able to
address all 4G of memory.

I am running 2.4.13-ac8

The way i understand it is that linux shares the top 1G of process address
space with all processes on the system(so on systems with 4G is physical
addressability, it leaves 3G for each process).

>From the archives, i learnt that i need to modify __PAGE_OFFSET and change
it from the default  (0xC0000000).

Looking at /usr/src/linux/include/asm-i386/page.h

<<SNIP>>
/*
 * This handles the memory map.. We could make this a config
 * option, but too many people screw it up, and too few need
 * it.
 *
 * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
 * a virtual address space of one gigabyte, which limits the
 * amount of physical memory you can use to about 950MB.
 *
 * If you want more physical memory than this then see the
 *   CONFIG_HIGHMEM4G
 * and CONFIG_HIGHMEM64G options in the kernel configuration.
 */

<<END_OF_SNIP>>

When i compiled my kernel, i set CONFIG_HIGHMEM4G.

Does this mean that all my programs should be able to address 4G ?

If yes, i dont think it is working very well.

#include<stdio.h>
#include<sys/resource.h>
#include<unistd.h>
#include<sys/wait.h>
#include<stdlib.h>

main(int argc, char **argv)
{

        char    *n;
  int   size = 1073741000;
        unsigned int totalsize = 0;

        while(size > 1000)      {
                while(n=(char *) malloc(size))  {
                        bzero(n, size);
                        totalsize += size;
                }
//              usleep(999999) ;
                size = size / 2;
        }
        printf("Total size = %lu\n", totalsize);
}

The variable "totalsize" goes upto 3G only.

If seting CONFIG_HIGHMEM4G is not the way to proceed, could someone please
point me in the right direction.

Thanks for taking the time to read my email, and sorry about the long
post.

Best Regards,


/dev/null

devnull@adc.idt.com



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-06-20 15:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-20  2:01 >3G Memory support marc.miller
2002-06-20  2:08 ` William Lee Irwin III
2002-06-20  4:38   ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2002-06-19 22:30 devnull
2002-06-20  3:29 ` Brian Gerst
2002-06-20 14:18   ` devnull
2002-06-20 14:42     ` Brian Gerst
2002-06-20 14:50       ` Jirka Kosina
2002-06-20 15:27         ` William Lee Irwin III
2002-06-20 15:42     ` Richard B. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox