This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Is -lmalloc safe with g++ 2.95.3 and Solaris 8?
- From: Jonathan Eckstein <jeckstei at rutcor dot rutgers dot edu>
- To: gcc-help at gnu dot org
- Date: Fri, 09 Aug 2002 21:55:44 -0400
- Subject: Is -lmalloc safe with g++ 2.95.3 and Solaris 8?
Hello --
I am developing a large, compute-intensive C++ code on a Solaris 8
(Sparc) platform with gcc 2.95.3. As my application runs, it
periodically prints a status line containing memory usage information
gleaned from the "mallinfo" function. To get the code to link, I
specify "-lmalloc" at link time. Recently, the code has been aborting
frequently, usually from somewhere in "free", but occasionally in
"mallinfo". I tried removing the call to from the code "mallinfo" and
the "-lmalloc" from the link command line, and the application started
running fine again.
My question is: is it safe to link with "-lmalloc" when using g++ 2.95.3
under Solaris 8?
If not, that would explain why the application is going haywire. If it
should be OK, then I have some subtle memory bug that only happens to
fatally corrupt the arena if things are linked in a particular way.
Please reply directly since I don't monitor this list.
Thanks,
Jonathan
--
Associate Professor Jonathan Eckstein
MSIS Department, Rutgers Business School, Rutgers University
TEACHING ADDRESS RESEARCH ADDRESS
+------------------------------+--------------------------------+
| 255 J.H. Levin Building | RUTCOR, Room 148 |
| 94 Rockafeller Road | 640 Bartholomew Road |
| Livingston Campus | Busch Campus |
| Rutgers University | Rutgers University |
| Piscataway, NJ 08854 USA | Piscataway, NJ 08854 USA |
| (732) 445-0510 | (732) 445-3596 |
| FAX (732) 445-6329 | FAX (732) 445-5472 |
+------------------------------+--------------------------------+
jeckstei@rutcor.rutgers.edu
http://rutcor.rutgers.edu/~jeckstei/