Memory leaks and garbage collector for c++ (libgc) usage
Hi,
I'm trying to solve memory leaks tedious question in my application using the provided Sun library libgc.
I've tried to link the library dynamically using the -lgc flag, but when I run the app, it crashes almost immediately.
In the core file and in the log file gc.log I can see that probably the function which causes the application crash is gcGetCleanMemory().
Here's the content of the libgc log file:
This file contains Sun Visual Workshop Memory Monitor's messages for this program run.
gcall Build $Id$ Threads Version 3.10 for Forte C++ 5.4
gcUnixMMap: MAP_FAILED when mapping /dev/zero (fswap=3, size=65536Kb, flags=0x10)
!!! **** gcGetCleanMemory: MMAP committed failed
My OS is:
bash-2.03$ uname -a
SunOS localhost 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-880
Could someone help me?
I've also tried to preload the library (export LD_PRELOAD=/opt/SUNWspro/lib/v9/libgc.so) but the result doesn't change.
Thanks
Alex

