Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!hao!noao!arizona!rupley From: rupley@arizona.edu (John Rupley) Newsgroups: comp.unix.xenix Subject: Re: malloc weirdness on Microport System V/AT Message-ID: <2562@megaron.arizona.edu> Date: Mon, 26-Oct-87 13:30:20 EST Article-I.D.: megaron.2562 Posted: Mon Oct 26 13:30:20 1987 Date-Received: Wed, 28-Oct-87 06:51:52 EST References: <4299@well.UUCP> Organization: U of Arizona CS Dept, Tucson Lines: 79 Keywords: malloc swapping Microport Summary: Problem with Microport malloc verified In article <4299@well.UUCP>, johnl@well.UUCP (John A. Limpert) writes: > I have noticed something odd with malloc on microport. When I run > a programs that does alot of malloc calls that allocate relatively > small chunks of memory, the program gets swapped to disk at a very > high rate. This seems to start once a certain amount of memory has > been allocated. It commonly occurs when I edit large files with > MicroEMACS or when running pathalias. My machine has about 2.7 MB I have found the same problem, under microport sysV/AT.2.2, and sent a bug report to microport. No response. I would be grateful for any help. Is the problem "unfixable", ie tied to the Intel segmented architecture? For anyone who wants to verify the malloc problem, the following code shows it. John Rupley uucp: ...!ihnp4!arizona!rupley voice: 602-325-4533 ****************cut here************************ # To unbundle, sh this file echo unbundling makefile 1>&2 cat >makefile <<'AlBeRtEiNsTeIn' CFLAGS= -Ml maltst: maltst.o cc $(CFLAGS) maltst.o -o malloc.test size malloc.test AlBeRtEiNsTeIn echo unbundling maltst.c 1>&2 cat >maltst.c <<'AlBeRtEiNsTeIn' /* malloc.test.c test of malloc for large files problem-- after about 300 kbytes of allocation, the system behaves oddly: ps shows no valid text pointer and a "growing" process things seem stranger when compiled with malloc library */ #include #include main(argc, argv) int argc; char **argv; { extern void exit(); extern char *malloc(); char *lp; unsigned limit; unsigned i; unsigned size; if (argc < 3) { printf("usage: %s malloc_size number_of_mallocs\n", argv[0]); exit(-1); } size = (unsigned )atoi(argv[1]); limit = (unsigned )atoi(argv[2]); printf("\n\n"); for (i = 0; i < limit; i++) { lp = malloc(size); printf("lp = %lx bytes = %ld\r", lp, (long )((i+1)*size)); } printf("\n\n"); exit(1); } AlBeRtEiNsTeIn