Re: C Function Memory Management

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: C Function Memory Management
Дата
Msg-id 8510.1355326141@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: C Function Memory Management  (Martin French <Martin.French@romaxtech.com>)
Ответы Re: C Function Memory Management
Список pgsql-general
Martin French <Martin.French@romaxtech.com> 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


В списке pgsql-general по дате отправления:

Предыдущее
От: wd
Дата:
Сообщение: Re: Looking for cooperators
Следующее
От: Martin French
Дата:
Сообщение: Re: C Function Memory Management