Re: pointer scope and memory contexts

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Tim Keitt" <tkeitt(at)keittlab(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pointer scope and memory contexts
Date: 2008-11-06 12:53:17
Message-ID: 2e78013d0811060453l49dbc87oc9c60549e5963de2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 6, 2008 at 7:01 AM, Tim Keitt <tkeitt(at)keittlab(dot)org> wrote:
> I am working on a set returning function and have a question about
> switching memory contexts. Basically, what I want to know is whether
> memory allocated in one context can be referenced when a different
> context is current.

You can safely refer the memory allocated in a different context as
long as the other memory context is still alive.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2008-11-06 13:16:12 Re: regression in analyze
Previous Message Volkan YAZICI 2008-11-06 12:49:13 Re: question about large object