cc1plus take too much memory

View: New views
8 Messages — Rating Filter:   Alert me  

cc1plus take too much memory

by mahmoodn :: Rate this Message:

| View Threaded | Show Only this Message

Hello,
I do not know why gcc process (cc1plus) take too much memory during compilation (over 600 MB). according to system monitor,

total:      658 MB
RSS:     651 MB
shared:  11.2 MB


Don't you think it is abnormal? maybe there is a memory leak in gcc.

I have to say that I use gcc 3.3

Re: cc1plus take too much memory

by Andrew Haley :: Rate this Message:

| View Threaded | Show Only this Message

mahmoodn writes:
 >
 > I do not know why gcc process (cc1plus) take too much memory during
 > compilation (over 600 MB). according to system monitor,
 >
 > total:      658 MB
 > RSS:     651 MB
 > shared:  11.2 MB
 >
 > Don't you think it is abnormal?>-( maybe there is a memory leak in gcc.
 >
 > I have to say that I use gcc 3.3

A couple of things:

  gcc 3.3 (released May 2003) is no longer being developed.  Anything
  it does today it will always do.

  We don't know if this is abnormal because we don't know what you
  were trying to compile.

Andrew.

--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

Re: cc1plus take too much memory

by mahmoodn :: Rate this Message:

| View Threaded | Show Only this Message

>  gcc 3.3 (released May 2003) is no longer being developed.  Anything
>  it does today it will always do.

I will work around with my code to get it ready for newer versions of gcc, but untill then:

>  We don't know if this is abnormal because we don't know what you
>  were trying to compile.

what information should I provide?



Andrew Haley wrote:
mahmoodn writes:
 >
 > I do not know why gcc process (cc1plus) take too much memory during
 > compilation (over 600 MB). according to system monitor,
 >
 > total:      658 MB
 > RSS:     651 MB
 > shared:  11.2 MB
 >
 > Don't you think it is abnormal?>-( maybe there is a memory leak in gcc.
 >
 > I have to say that I use gcc 3.3

A couple of things:

  gcc 3.3 (released May 2003) is no longer being developed.  Anything
  it does today it will always do.

  We don't know if this is abnormal because we don't know what you
  were trying to compile.

Andrew.

--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

Re: cc1plus take too much memory

by Andrew Haley :: Rate this Message:

| View Threaded | Show Only this Message

mahmoodn writes:
 >
 > >  gcc 3.3 (released May 2003) is no longer being developed.  Anything
 > >  it does today it will always do.
 >
 > I will work around with my code to get it ready for newer versions of gcc,
 > but untill then:
 >
 > >  We don't know if this is abnormal because we don't know what you
 > >  were trying to compile.
 >
 > what information should I provide?

Run the program you were trying to compile through "gcc -E".  How big
is the resulting text?  Are there any particularly long functions in
your program?  That kind of thing.

But I don't know how pointful this will be, given that gcc 3.3 is no
longer being developed.

Andrew.

--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

Re: cc1plus take too much memory

by mahmoodn :: Rate this Message:

| View Threaded | Show Only this Message

>Run the program you were trying to compile through "gcc -E".  How big
>is the resulting text?  Are there any particularly long functions in
>your program?  That kind of thing.

I have long functions with many typedefs. Have they any effect?

in the directory than contain makefile, the result of "gcc -E" is:
[naderan@Milky-way VVc_diagram_2]$ gcc -E
gcc: no input files

I use "make" instead to compile the project. what should I do then?


Andrew Haley wrote:
mahmoodn writes:
 >
 > >  gcc 3.3 (released May 2003) is no longer being developed.  Anything
 > >  it does today it will always do.
 >
 > I will work around with my code to get it ready for newer versions of gcc,
 > but untill then:
 >
 > >  We don't know if this is abnormal because we don't know what you
 > >  were trying to compile.
 >
 > what information should I provide?

Run the program you were trying to compile through "gcc -E".  How big
is the resulting text?  Are there any particularly long functions in
your program?  That kind of thing.

But I don't know how pointful this will be, given that gcc 3.3 is no
longer being developed.

Andrew.

--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

Re: cc1plus take too much memory

by Andrew Haley :: Rate this Message:

| View Threaded | Show Only this Message

mahmoodn writes:
 >
 > >Run the program you were trying to compile through "gcc -E".  How big
 > >is the resulting text?  Are there any particularly long functions in
 > >your program?  That kind of thing.
 >
 > I have long functions with many typedefs. Have they any effect?
 >
 > in the directory than contain makefile, the result of "gcc -E" is:
 > [naderan@Milky-way VVc_diagram_2]$ gcc -E
 > gcc: no input files
 >
 > I use "make" instead to compile the project. what should I do then?

Compile whichever file is causing the trouble with gcc -E to extract
the preprocessed source.

Have you ever compiled a C file without using make?

Andrew.

--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

Re: cc1plus take too much memory

by mahmoodn :: Rate this Message:

| View Threaded | Show Only this Message

>Compile whichever file is causing the trouble with gcc -E to extract
>the preprocessed source.

I did what you said, the largest file is 768KB.
is good or bad?


Andrew Haley wrote:
mahmoodn writes:
 >
 > >Run the program you were trying to compile through "gcc -E".  How big
 > >is the resulting text?  Are there any particularly long functions in
 > >your program?  That kind of thing.
 >
 > I have long functions with many typedefs. Have they any effect?
 >
 > in the directory than contain makefile, the result of "gcc -E" is:
 > [naderan@Milky-way VVc_diagram_2]$ gcc -E
 > gcc: no input files
 >
 > I use "make" instead to compile the project. what should I do then?

Compile whichever file is causing the trouble with gcc -E to extract
the preprocessed source.

Have you ever compiled a C file without using make?

Andrew.

--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

Re: cc1plus take too much memory

by Andrew Haley :: Rate this Message:

| View Threaded | Show Only this Message

mahmoodn writes:
 >
 > >Compile whichever file is causing the trouble with gcc -E to extract
 > >the preprocessed source.
 >
 > I did what you said, the largest file is 768KB.
 > is good or bad?

It's large, but not unreasonably so.  I'm not sure what's causing the
huge expansion in memory use.  

Andrew.

--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903