Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!wanderer.nsi.nasa.gov!root From: root@wanderer.nsi.nasa.gov (Michael C. Newell) Subject: Virtual memory problem Message-ID: <1993Jun24.015842.21623@news.arc.nasa.gov> Sender: usenet@news.arc.nasa.gov Organization: NASA Ames Research Center, Moffett Field, CA Date: Thu, 24 Jun 1993 01:58:42 GMT Lines: 40 I've been trying to compile some of the Xview utility programs (notably textedit), and they include LOTS of header files. They bomb out with an error, "insufficient virtual memory". This seemed odd to me because I have 16Mb of memory on the machine and a 20Mb swap partition (I know it is recommended to have 2xRealMemory for swap, but I don't have the space right now...) In fact, if I add another 88Mb volume that is ENTIRELY swap, I still get the error. So I wrote a simple C program that went into an infinte loop doing mallocs for 1K blocks of memory. It was able to get 3072 [interesting number...] before it ran out of VM. The drive with the 88Mb swap partition rattled around during this process, so I assume space was being allocated on it. The vmstat command showed about 1K of "free" memory; and some amount (I don't remember now how much) of "avl" memory. In rooting around the malloc related code I came across the constant "DFLDSIZ" in "/sys/i386/include/vmparam.h". It is supposed to be the "initial data size limit", and was set to "6*1024*1024", or 6Mb. I changed this to "16*1024*1024" and rebuilt the kernel. The little C program now was able to allocate 8192 1K blocks. This was enough to get past the "insufficient virtual memory" errors [unfortunately others followed... :{(] So my question is, "Why is this happening?" Why can't I allocate some reasonably close-to-16Mb amount of virtual memory? Is "DFLDSIZ" really the MAXIMUM amount (there is another constant "MAXDSIZ" set to 32Mb which would seem to perform that function.) ?? Thanks, Mike Newell NASA Advanced Network Applications Group