Search Postgresql Archives

Re: C Function Memory Management

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

 



Martin French <Martin.French@xxxxxxxxxxxxx> writes:
>> repalloc

> Maybe I should've looked a little harder for that one! Ha Ha!

> I assume it's an exact functional copy of realloc, and see where I get 
> with it!

One thing to know about it is that repalloc re-sizes the given chunk
while keeping it in the same memory context it was originally allocated
in (ie, CurrentMemoryContext doesn't matter).  This may not matter much
if you're only dealing with allocations that just live as long as the
current function call --- but if you're trying to preserve data across
calls, it's critical to know.

			regards, tom lane


-- 
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