lkml.org 
[lkml]   [2004]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: lost memory on a 4GB amd64
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@math.uni-giessen.de /\\
-------------------------------------------------------------------- _\_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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.092 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site