Date: Tue, 17 Aug 1999 11:54:57 +0400 From: "Alec Kalinin" <alec@relex.ru> To: <freebsd-hackers@freebsd.org> Subject: Probably bug with allocation memory in FreeBSD-3.2-RELEASE Message-ID: <01b001bee885$cca7b570$a34562c3@alec.relex.ru>
next in thread | raw e-mail | index | archive | help
Hello!
I think, mentioned below program probably show the bug in virtual memory
subsystem in FreeBSD-3.2-RELEASE. After running this program, FreeBSD comes
into "out of swap" state, then hungs.
Why i think this is bug? Because any user can hung FreeBSD, settings in
/etc/login.conf can't help.
Note: in FreeBSD-2.2.8 there is no this problem. The 2.2.8-system
successfully kill this program.
--------------------------------------------------------------------
#include <unistd.h>
#include <stdlib.h>
#define NALLOC 1000
#define SIZEALLOC 1024*1024
void main()
{
char *p_mem;
int i, j;
if (fork() != 0) return;
for (i=0; i<NALLOC; i++) {
p_mem = (char *)malloc(SIZEALLOC);
for (j=0; j<SIZEALLOC; j++) {
p_mem[j] = 0;
}
}
while (1);
}
--------------------------------------------------------------------
P.S. Sorry for my English...
Good luck,
Alec
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01b001bee885$cca7b570$a34562c3>
