Re: Which MemoryContext?

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Gevik Babakhani" <pgdev(at)xs4all(dot)nl>
Cc: "'pgsql-hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Which MemoryContext?
Date: 2008-02-20 20:57:34
Message-ID: 47BC943E.80906@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gevik Babakhani wrote:
> I want to keep an array of localized strings in memory.
> This array is dynamically allocated and is going to be used between
> transactions (that are not necessarily nested).
> It must be cleaned/freed when postmaster exists.
> In which context should this array be initialized? TopMemoryContext perhaps?

TopMemoryContext sounds right. Be careful not to leak there.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-02-20 20:57:45 Why does pg_ctl.c have its own copy of PM_VERSIONSTR?
Previous Message Magnus Hagander 2008-02-20 20:51:12 Re: Permanent settings