Re: change palloc to malloc - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: change palloc to malloc
Date
Msg-id 200503152329.j2FNTRW23307@candle.pha.pa.us
Whole thread Raw
In response to change palloc to malloc  (Nguyen Hai <nguyen_hai91@yahoo.com>)
Responses Re: change palloc to malloc
List pgsql-hackers
Nguyen Hai wrote:
> Hi,
> 
> Is it possible to convert palloc back to malloc?
> If so, what should I do to make the change?

You can, but palloc is automatically freed at the end of a query, while
malloc has to be freed in the code.  Why do you want to make the
switch?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Nguyen Hai
Date:
Subject: change palloc to malloc
Next
From: Neil Conway
Date:
Subject: Re: CVS head broken on win32?