Re: Built-in support for a memory consumption ulimit?

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Built-in support for a memory consumption ulimit?
Дата
Msg-id CAA4eK1Ju1VSECBQfOcqMfJ_1UBK-vcSqL7snuFz31QOMdMk_bQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Built-in support for a memory consumption ulimit?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Jun 18, 2014 at 10:00 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Amit Kapila <amit.kapila16@gmail.com> writes:
> > Won't it be possible if we convert malloc calls in backend code to
> > go through wrapper, we already have some precedents of same like
> > guc_malloc, pg_malloc?
>
> We do not have control over mallocs done by third-party code
> (think pl/perl for example).  

Yeah, mallocs done by third-party code would be difficult to track,
one possibility could be that we expose a built-in memory allocator
function.  I think it will lead to change in third-party code who wants
to use this new feature.  However if thats not viable then we need to
think about some OS specific calls like the one you have suggested
above (sbrk(0)), but I think that solution might also need to have
portable API for Windows.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Mitsumasa KONDO
Дата:
Сообщение: Re: gaussian distribution pgbench
Следующее
От: Craig Ringer
Дата:
Сообщение: include_dir catch-22