Re: Memory leaks - Mailing list pgsql-hackers

From Nigel J. Andrews
Subject Re: Memory leaks
Date
Msg-id Pine.LNX.4.21.0210231139570.6246-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Re: Memory leaks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Memory leaks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, 22 Oct 2002, Tom Lane wrote:

> Greg Copeland <greg@copelandconsulting.net> writes:
> 
> > Interesting.  Having not looked at memory management schemes used in the
> > pl implementations, can you enlighten me by what you mean by "integrate
> > the memory-context notion"?  Does that mean they are not using
> > palloc/pfree stuff?
> 
> Not everywhere.  plpgsql is full of malloc's and I think the other PL
> modules are too --- and that's not to mention the allocation policies of
> the perl, tcl, etc, language interpreters...

I was going to make the suggestion that malloc et al. could be replaced with
palloc etc but then that raises too many complications without just shooving
everything into a long lived context anyway. Also I think we've got to rely on,
i.e. it is sensible to do so, the underlying language handling memory
correctly.

Hmmm...there do seem to be a few mallocs in plpython.c . I haven't looked very
closely but nothing jumped out at me as being obviously wrong from the grep
output.


-- 
Nigel J. Andrews



pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: Memory leaks
Next
From: dima
Date:
Subject: Re: [ADMIN] Security question : Database access control