Re: Memory leaks

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Copeland <greg(at)copelandconsulting(dot)net>, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Memory leaks
Date: 2002-10-23 11:44:09
Message-ID: Pine.LNX.4.21.0210231139570.6246-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 22 Oct 2002, Tom Lane wrote:

> Greg Copeland <greg(at)copelandconsulting(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Copeland 2002-10-23 13:33:13 Re: Memory leaks
Previous Message Karel Zak 2002-10-23 06:13:53 Re: Memory leaks