lkml.org 
[lkml]   [1999]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[TESTCASE] `Out of memory for cc1'
Hi,

I took a look at what the clisp package is doing which leads up
to the error condition, and find that it's shm. The following
testcase is extracted from 'configure', and causes the symptom
to appear reliably (here:).

To create the problem, run while true; do kaboom; done on one
vt, and then try to do pretty much _anything_ on another.

-Mike


---------------------------shm testcase--------------------------
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>

/* try attaching a single segment to multiple addresses */
#define segsize 0x10000
#define attaches 128
#define base_addr 0x01000000
main ()
{ int shmid, i; char* addr; char* result;
if ((shmid = shmget(IPC_PRIVATE,segsize,0400)) < 0) exit(1);
for (i=0, addr = (char*)0x01000000; i<attaches; i++, addr += segsize)
{ if ((result = shmat(shmid,addr,SHM_RDONLY)) == (char*)(-1)) break; }
for (i=0, addr = (char*)0x01000000; i<attaches; i++, addr += segsize)
shmdt(addr);
shmctl(shmid,IPC_RMID,0);
exit(result == (char*)(-1));
}


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

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