Re: unchecked malloc

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: unchecked malloc
Дата
Msg-id 8059.1127799607@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: unchecked malloc  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Ответы Re: unchecked malloc  (Sibtay Abbas <sibtay@gmail.com>)
Список pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> wrote
>> No, because you're thinking in terms of the backend environment, and
>> generally in the backend the answer to "when to use malloc directly"
>> is "never".

> Well, except before MemoryContext mechanism is set up? For example, the 
> functions(e.g., GUC, vfd) used during bootstrap.

I think you need to take another look at the startup sequences.  Those
modules are not run before MemoryContextInit.  In any case, the odds
of running out of memory before we get to MemoryContextInit are so small
that I don't have a problem with crashing if it happens.
        regards, tom lane


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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: unchecked malloc
Следующее
От: Michael Paesold
Дата:
Сообщение: Re: State of support for back PG branches