From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 2 Nov 2012 07:39:43 -0700 From: Anthony Martin To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20121102143943.GA20543@dinah> References: <3816729a-a9d5-4f63-9850-c7247edae37e@c16g2000yqe.googlegroups.com> <28d5b94e81a770e9521a1b80366b8892@brasstown.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28d5b94e81a770e9521a1b80366b8892@brasstown.quanstro.net> Cc: pavel.klinkovsky@gmail.com Subject: Re: [9fans] Kernel panic when compiling Go on native Plan 9 Topicbox-Message-UUID: cfe65582-ead7-11e9-9d60-3106f5b1d025 erik quanstrom once said: > On Fri Nov 2 09:44:43 EDT 2012, pavel.klinkovsky@gmail.com wrote: > > > How much memory does your system have? > > > > - 512 MB RAM > > - 512 MB swap > > > > > Changeset 14739 grew the Unicode collation tables > > > in the exp/locale/collate package by a considerable > > > amount. The compiler's memory usage now goes above > > > 400 MB when building that package, almost 2.5x the > > > amount used to compile the second heavyweight and > > > 15x the average. > > > > I see. > > I can confirm when the kernel panic occured I saw (in stats): > > - full RAM > > - small portion of swap occupied If you want to work around this for the time being, it's safe to remove that package since it's currently an experiment and no other package depends on it. Just 'rm -rf' the exp/locale/collate directory and run you should be good. > i'd wonder though if there were some way to cut down the module > so it doesn't take quite so much memory. even halving it would > mean you could ditch swap. There's a note at the top of the generated tables.go file that says "TODO: implement more compact representation for sparse blocks". I'm going to investigate what's causing such high memory usage in the compiler. I imagine those huge array initializations cause hundreds of thousands of Node allocations, at the very least. Anthony