gcc -pg / gprof trouble (under Redhat for SPARC)

gcc -pg / gprof trouble (under Redhat for SPARC)

Post by Daniel Barke » Sun, 21 Jun 1998 04:00:00

gcc -pg, "Generate extra code to write profile information suitable for
the analysis program `gprof'" (Info), gives trouble. After compiling and
linking with gcc -ansi -pg -Wall, I get a run-time fatal memory error:

% ./a.out
No space for profiling buffer(s)
[then some minutes later ...]
Segmentation fault (core dumped)

and I am left with an empty gmon.out file.

According to gdb, the crash is in _mcleanup(), which is not one of my own
functions. There is no seg. fault when the program is compiled in the same
way but without -pg. There is 4 G of disk space and free memory of 60 M
RAM + 50 M swap (including buffers and cached), and the shell limits are

% limit
cputime         unlimited
filesize        unlimited
datasize        unlimited
stacksize       8192 kbytes
coredumpsize    1000000 kbytes
memoryuse       unlimited
descriptors     256
memorylocked    unlimited
maxproc         256

I have just tried compiling and linking with -p instead of -pg, but I get
the same "No space for profiling buffer(s)" message, and a dump of core
when in _mcleanup ()again when I CTRL-c.

I would be grateful for any advice on how to work around this. Also, if
anyone knows about other profilers, especially pc-sampling profilers,
please let me know. I could cobble something together with profil() plus
gcc -a, but I assume someone has been there before me.

Thank you.

Daniel Barker,
Biocomputing Research Unit,
Institute of Cell and Molecular Biology,
Swann Building,
King's Buildings,
Mayfield Road,


1. vim pg up/ pg down

Does anyone know how to make the pg up and pg down keys work with vim.
They work with elvis.  I tried to read the man page, but it wasn't
included with my slackware dist.  Is there a .vimrc config file in which
I can map pg up and pg down to <ctrl>F and <Ctrl>B?  I don't want to use
something like kbd package b/c I only want it for this application, not
all of X.  Any help is greatly appreciated
        TIA, Broc
                                                    Broc Stirton


2. is kermit faster than ppp?

3. PG-UP / PG-DOWN in mc

4. ASUS SP97-V with SiS 5598 Chipset

5. Missing files for compiling with -p & -pg option for gcc solaris x86

6. HELP - IBM rs6k Ultra scsi config

7. GCC 2.7.0 with -pg option

8. sendmail rule for all of domain

9. gcc -pg compiler switch

10. gcc 2.9.5 anf 6.0 redhat (sparc)

11. Bug warning: compiling with GCC on Redhat 4.2 for SPARC

12. sparc redhat linux 6.2 - sound trouble

13. RedHat & Sparc IPX install troubles