public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG]  oom killer not triggering in 2.6.9-rc3
@ 2004-10-09  0:14 Chris Friesen
  2004-10-09  0:26 ` Chris Wright
  2004-10-11 13:58 ` Alan Cox
  0 siblings, 2 replies; 14+ messages in thread
From: Chris Friesen @ 2004-10-09  0:14 UTC (permalink / raw)
  To: Linux kernel


I have an Xserve running 2.6.9-rc3 and patched to run the ppc kernel rather than 
the ppc64 kernel.  It's configured with 2GB of memory, no swap.

If I run one instance of the following program, it allocates all but about 3MB 
of memory, and the memory hog spins with 100% of the cpu.

If I run two instances of the program, the machine locks up, doesn't respond to 
pings, and is basically dead to the world.

Shouldn't the oom-killer be kicking in?

Chris







#include <stdlib.h>
#include <unistd.h>

#define PAGES 1000
#define BLOCKSIZE (pgsz * PAGES)

int main()
{
	int pgsz = sysconf(_SC_PAGESIZE);

	while(1) {
		char *p = (char *)malloc(BLOCKSIZE);
		if (p)
			for (int i=0;i<PAGES;i++)
				*(p+(i*pgsz)) = 1;
	}
	return 0;
}

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

end of thread, other threads:[~2004-10-12 22:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-09  0:14 [BUG] oom killer not triggering in 2.6.9-rc3 Chris Friesen
2004-10-09  0:26 ` Chris Wright
2004-10-11 13:58 ` Alan Cox
2004-10-12  5:03   ` Chris Friesen
2004-10-12  5:22     ` William Lee Irwin III
2004-10-12 15:24       ` Chris Friesen
2004-10-12 16:28         ` William Lee Irwin III
2004-10-12  9:44     ` Andries Brouwer
2004-10-12 15:32       ` Chris Friesen
2004-10-12 20:08         ` Chris Wright
2004-10-12 20:41           ` [BUG] oom killer not triggering in 2.6.9-rc3 -- FIXED in -rc4 Chris Friesen
2004-10-12 20:54             ` Chris Wright
2004-10-12 21:02     ` [BUG] oom killer not triggering in 2.6.9-rc3 Alan Cox
2004-10-12 22:25       ` Chris Friesen

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