*BSD News Article 6879


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!sgiblab!tsoft!barfeau
From: bbs.barfeau@tsoft.sf-bay.org (David Fox)
Subject: Re: running out of memory in compiling kernel
Message-ID: <qT42sB1w165w@tsoft.sf-bay.org>
Sender: bbs@tsoft.sf-bay.org (BBS User)
Organization: The TSoft BBS and Public Access Unix, +1 415 969 8238
Date: Thu, 22 Oct 1992 17:30:37 GMT
Lines: 38


David.Fox@Saigon.COM wrote:
: Hi bsders,
: 
: I got the kernel source code and started to compile the kernel from 
scratch.
: Everything was seemingly going smoothly until I noticed that the make 
was
: stuck trying to compile nfs/nfs_serv.c, and it was taking about 1 1/2 
HOURS
: to compile this particular file.  After this long time, I decided to 
try 
:  
>I've been meaning to post about this too.  What I find is that when i 
rebuild
>from scratch (i.e. after deleting all objs) the compiler eventually hits
>what seems to be an infinite loop.  If I control-C out of make, and
>then make again (restarting a compile of the same file) it once again
>compiles forever.  Re-booting however and doing make, the offending
>file will re-compile in a few seconds.  However,  usually later on
>the same thing happens again with a different file.  Again a re-boot
>fixes the problem.  My guess as to what is happening is that
>there is a memory leak somewhere which causes the compiler to hang
>after doing a certain amount of work.  Re-booting restores the memory
>(or swap space?) and allows more compiling to happen until the memory
>(or swap space?) fills up again.  I have only seen this when 
re-compiling
>the kernel, but I haven't built anything else with that many files to
>compile all at once.  

After experimenting some more, it definitely IS a memory leak in the
make program.  I was recompiling the kernel last night, and periodically
did a suspend followed by a ps -alx.  The VSZ kept increasing until the
memory consumed by make was over one megabyte, and the memory used by
cc1 was at almost two megabytes before the system became unusable.

--
David Fox (bbs.barfeau@tsoft.sf-bay.org)