Re: lost memory on a 4GB amd64

From: Sergei Haller
Date: Sun Oct 24 2004 - 04:56:43 EST


On Sat, 23 Oct 2004, Andi Kleen (AK) wrote:

AK> > dmesg-2.6.9-smp-noNUMA (working one)
AK>
AK> I bet that if you fill all memory on the non NUMA setup
AK> it will crash too.
AK>
AK> e.g. run something like this
AK>
AK> #include <stdlib.h>
AK> #include <string.h>
AK> #include <unistd.h>
AK> #include <stdio.h>
AK>
AK> #define MEMSIZE
AK> main()
AK> {
AK> unsigned long len = (sysconf(_SC_AVPHYS_PAGES) - 10)* getpagesize();
AK> char *mem = malloc(len);
AK> for (;;) {
AK> memset(mem, 0xff, len);
AK> printf(".");
AK> }
AK> }

what's the difference to the program I posted (here a link to an archive:
http://marc.theaimsgroup.com/?l=linux-kernel&m=109567610824746&w=4

other than yours is filling the memory with 0xFF and mine with 0x00 and
mine does it only once and yours continuously?

BTW: I added an fflush(stdout) after the printf and after two lines of
dots on a 150 cols terminal I just stopped the Program. This is with
2.6.9-smp-noNUMA.

on a 2.6.9-smp-NUMA, running my program crashes the kernel immediately.


c ya
Sergei
--
-------------------------------------------------------------------- -?)
eMail: Sergei.Haller@xxxxxxxxxxxxxxxxxxx /\\
-------------------------------------------------------------------- _\_V
Be careful of reading health books, you might die of a misprint.
-- Mark Twain
-
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/