Re: memory bug debugging - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: memory bug debugging
Date
Msg-id 20051004121143.GE17589@svana.org
Whole thread Raw
In response to memory bug debugging  (Markus Schiltknecht <markus@bluegap.ch>)
Responses Re: memory bug debugging
List pgsql-hackers
On Tue, Oct 04, 2005 at 01:11:41PM +0200, Markus Schiltknecht wrote:
> Hello hackers,
>
> I'm fiddling around with the backend and have created a memory bug. I
> guess I'm overriding a palloced chunk, but can't figure out where.

There are some defines (MEMORY_CONTEXT_CHECKING and
CLOBBER_FREED_MEMORY) which can help find leaks. Valgrind works too,
with a bit of attention. I was going to add some directives to allow
Valgrind to handle PostgreSQL's memory allocator, but have got there
yet.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [PERFORM] A Better External Sort?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: [PERFORM] A Better External Sort?