Re[2]: [Gc] GC_MALLOC() Failure

Ivan Maidanski ivmai at mail.ru
Mon May 10 12:29:43 PDT 2010


Mon, 10 May 2010 18:47:38 +0100 Andrew Haley <aph at redhat.com>:

> On 05/10/2010 06:39 PM, Volkan YAZICI wrote:
> > Hi,
> > 
> > I've been trying to use Boehm GC on a SunFire X4400 with 128GB memory.
> > Suprisingly, some GC_MALLOC() calls return NULL despite I have enough
> > free space. ulimit output is as below:
> > 
> >   core file size          (blocks, -c) 0
> >   data seg size           (kbytes, -d) unlimited
> >   scheduling priority             (-e) 0
> >   file size               (blocks, -f) unlimited
> >   pending signals                 (-i) 1033572
> >   max locked memory       (kbytes, -l) 64
> >   max memory size         (kbytes, -m) unlimited
> >   open files                      (-n) 1024
> >   pipe size            (512 bytes, -p) 8
> >   POSIX message queues     (bytes, -q) 819200
> >   real-time priority              (-r) 0
> >   stack size              (kbytes, -s) 8192
> >   cpu time               (seconds, -t) unlimited
> >   max user processes              (-u) 1033572
> >   virtual memory          (kbytes, -v) unlimited
> >   file locks                      (-x) unlimited
> > 
> > This is Debian GNU/Linux lenny (stable) with gcc version 4.3.2 (Debian
> > 4.3.2-1.1) installed. What I might be missing? How can I spot the
> > problem? Any helps will be really appreciated.

I'd recommend you:
0. use the latest BoehmGC from CVS (or, at least, gc-7.2alpha4.tar.gz);
1. first compile libgc without -DUSE_MUNMAP -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -DNO_DEBUGGING but with -DGC_ASSERTIONS;
2. identify the reason GC_allochblk() returns 0 (every GC_malloc for a large object calls GC_allochblk).

> 
> The easiest way is to use strace on the mmap() calls.
> 
> Andrew.



More information about the Gc mailing list