[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EMACS and valgrind

From: Eli Zaretskii
Subject: Re: EMACS and valgrind
Date: Sat, 24 Jan 2004 12:25:12 +0200

> From: Nick Roberts <address@hidden>
> Date: Fri, 23 Jan 2004 22:07:44 +0000
>  It looks like USE_LSB_TAG has moved the problem from a lisp one to one of
>  memory allocation. As Eli has said earlier, the valgrind team have noted that
>  memory debugging doesn't work with Emacs:
> doc> Programs which are known not to work are:
> doc>    * emacs starts up but immediately concludes it is out of memory and
> doc>    aborts. Emacs has it's own memory-management scheme, but I don't
> doc>    understand why this should interact so badly with Valgrind. Emacs
> doc>    works fine if you build it to use the standard malloc/free routines.
> So I guess its not a simple problem.

I think we need to bring the valgrind developer(s) on board to help
debugging this.  Perhaps Richard could ask him/her/them to help.
valgrind sounds like a great tool for finding memory-related bugs;
it'd be a pity if we couldn't find a way to use it.

Note that there's a section in etc/DEBUG about building Emacs with
malloc-debugging packages (most of the info there is actually based on
Purify, but the name isn't mentioned because Purify is not Free
Software).  It's possible that some of the advice there could help
with valgrind, although I wouldn't hold my breath, since valgrind
inner workings are very different, AFAICT.

As another note, the above citation claims that Emacs compiled with
``the standard malloc'' works fine under valgrind, but I always
thought that Emacs built on GNU/Linux uses the system malloc by
default, isn't that so?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]