public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* cc1plus memory consumption
@ 2003-11-28  1:57 S T
  2003-11-28  3:01 ` Andrew Bevitt
  0 siblings, 1 reply; 3+ messages in thread
From: S T @ 2003-11-28  1:57 UTC (permalink / raw)
  To: gcc-help

Hi, I currently run gentoo 1.4 with gcc 3.2.3-r2 on a dell laptop (P3 866) with 128MB of RAM. Usually, when I'm compiling large projects, KDE for example, I notice that my computer begins to thrash alot. I looked at the output of top, and I see 2 processes of cc1plus running consuming about 40-50MB average. I traced this down to that fact that gentoo uses make -j2 to compile files, so removing the -j2 flag stopped the thrashing. 

Now, I have a different computer (P2 500, 128MB RAM) running Redhat 8, gcc 3.2-7. I decided to try "make -j2" when compiling KDE on this computer. I noticed that this computer did not thrash. Checking the output of "top", I noticed that the 2 cc1plus processes were consuming about 20MB average, which is over half the memory used with my gentoo machine.

Now I'm wondering what caused such an increase in memory usage. Did something change from gcc 3.2 -> 3.2.3? Any ideas would be helpful.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cc1plus memory consumption
  2003-11-28  1:57 cc1plus memory consumption S T
@ 2003-11-28  3:01 ` Andrew Bevitt
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Bevitt @ 2003-11-28  3:01 UTC (permalink / raw)
  To: gcc-help

> Now I'm wondering what caused such an increase in memory usage. Did
> something change from gcc 3.2 -> 3.2.3? Any ideas would be helpful.

Id be guessing on the CFLAGS used.
Did you use similar CFLAGS in your tests on the RH system? 

This can create sizable differences in compile time and memory used.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cc1plus memory consumption
@ 2003-11-28  4:05 S T
  0 siblings, 0 replies; 3+ messages in thread
From: S T @ 2003-11-28  4:05 UTC (permalink / raw)
  To: gcc-help

>Id be guessing on the CFLAGS used.
>Did you use similar CFLAGS in your tests on the RH system? 

>This can create sizable differences in compile time and memory used.

I did use the same C/CXXFLAGS for the testing.
I used "-march=pentium3 -O3 -pipe".
I also tried the -fno-inline, it helped a bit, but still doesn't explain the large memory consumption differences between the two compilers.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-11-28  4:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-28  1:57 cc1plus memory consumption S T
2003-11-28  3:01 ` Andrew Bevitt
2003-11-28  4:05 S T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).