Search Postgresql Archives

Re: Can SET_VARSIZE cause a memory leak?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 8, 2016 at 9:55 PM, Albe Laurenz <laurenz.albe@xxxxxxxxxx> wrote:
> This is safe, and the memory will be freed at the end of the transaction.

Yes, palloc takes memory from the current memory context. The case
where you would need to use pfree is if there is an allocation
continuously done within the same code paths for a reason or another
that may result in a leak if this code path is taken repeatedly and
that the memory used is wasted out.
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux