GCC: Too Many Open Files

Jan 22, 2012 at 1:28pm
closed account (zb0S216C)
I've just compiled my test console and GCC overrode my std::cout's and printed this:

gmon.out: Too many open files

I don't know where to start with this one. Has anybody encountered this before? If you're a victim of this error, can you provide a solution?

Thanks.

Wazzak
Last edited on Jan 22, 2012 at 1:29pm
Jan 22, 2012 at 3:47pm
Just a guess here, but are you opening too many files?
Jan 22, 2012 at 3:48pm
closed account (zb0S216C)
Thanks for the reply, Disch.

I wasn't opening any files. Regardless, fstream wasn't even included.

Wazzak
Jan 22, 2012 at 4:35pm
> gmon.out: Too many open files

AFAIK, gmon.out is the default name for profiler call graph output file. Are you compiling with the -pg or -p switches? If so, turn it off (unless it is your intent to run gprof on the profiler output).

Jan 22, 2012 at 4:50pm
closed account (zb0S216C)
Yes, the profile was on... for some reason. I've turned it off and now it doesn't show. Thanks, JLBorges. Just out of curiosity, I attempted to open the file the compiler generated, and it wasn't readable. What goods' tha'?

Wazzak
Jan 22, 2012 at 5:08pm
It is a binary file. gprof is the tool that knows how to interpret the profile information.
The details are here: http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html

Jan 22, 2012 at 5:16pm
closed account (zb0S216C)
Thanks again, JLBorges.

Wazzak
Topic archived. No new replies allowed.