Re: Setting oom_adj on linux?

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: Setting oom_adj on linux?
Дата
Msg-id 34d269d41001080724w4e70deb4n701f549bfb727c31@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Setting oom_adj on linux?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Fri, Jan 8, 2010 at 07:53, Bruce Momjian <bruce@momjian.us> wrote:
> Alex Hunsaker wrote:
>> On Thu, Jan 7, 2010 at 20:26, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> > Alex Hunsaker <badalex@gmail.com> writes:

> The usual solution for this kind of thing is:
>
>        #ifdef LINUX
>        #define OOM_ADJUST oom_adjust()
>        #else
>        #define OOM_ADJUST do {} while (0)
>        #endif
>
> so there is no call or dummy function and you reference it in the code
> as:

Surely any compiler worth its salt would turn a call to an empty void
function into a noop?  Then again maybe I just hate macros :)


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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: RFC: PostgreSQL Add-On Network
Следующее
От: Robert Haas
Дата:
Сообщение: Re: RFC: PostgreSQL Add-On Network