Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7418) memory usage for compiling
Home

[Freeciv-Dev] Re: (PR#7418) memory usage for compiling

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ue80@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7418) memory usage for compiling
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Fri, 13 Feb 2004 02:31:08 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7418 >

On Thu, Feb 12, 2004 at 12:56:27PM -0800, Jason Short wrote:
> > I think that compiling freeciv needs to much memory ...
> > 
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND        
> >    
> >  5633 freeciv   18   0  107m 101m 7344 D 22.7 20.1   0:16.92 cc1       
> > 
> > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I./aicore    -g -O2 -Wall
> > -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations
> > -MT packets_gen.o -MD -MP -MF ".deps/packets_gen.Tpo" \
> >   -c -o packets_gen.o `test -f 'packets_gen.c' || echo
> > './'`packets_gen.c; \
> > then mv -f ".deps/packets_gen.Tpo" ".deps/packets_gen.Po"; \
> > else rm -f ".deps/packets_gen.Tpo"; exit 1; \
> > fi
> > 
> > I think 100 MB memory is more than to much for me to compile freeciv.

I agree that it is a lot. But you have 500mb in this computer. What is
the problem?

I'm not sure if there is a switch for gcc to reduce memory
footprint. Omitting the "-O2" may help.

> This happens because packets_gen.c is 648k in size.  Huge!
> 
> > For S1_14 the maximum which was shown from top (ok top isn't allways
> > right) is:
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND        
> >    
> >  6423 freeciv   25   0 29760  25m 6848 R 60.7  5.0   0:01.84 cc1            
> >    
> > 
> > Is there a possibility to reduce the memory is needed?

> The former should be quite possible; it requires changes to generate.py. 
>   You'll have to take it up with Raimar.

What idea(s) do you have?

> or split it up.

Splitting up in different file would be possible but doing this only
for compiling is not going to happen. What could be possible to do the
splitting on the fly and feed the code piece by piece into gcc by some
Makefile magic.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Despite all the medical advances of the 20th century, the mortality 
  rate remains unchanged at 1 death per person."




[Prev in Thread] Current Thread [Next in Thread]