Re: Safe memory allocation functions

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Safe memory allocation functions
Дата
Msg-id CAB7nPqR4K=CLiYs__JzVUV6Q_dE9Y0xPYSgDBDdhEcxMBXtGCg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Safe memory allocation functions  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Sat, Jan 31, 2015 at 2:58 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> Committed.  I didn't think we really need to expose two separate flags
> for the aligned and unaligned cases, so I ripped that out.  I also
> removed the duplicate documentation of the new constants in the
> function header; having two copies of the documentation, one far
> removed from the constants themselves, is a recipe for them eventually
> getting out of sync.  I also moved the function to what I thought was
> a more logical place in the file, and rearranged the order of tests
> slightly so that, in the common path, we test only whether ret == NULL
> and not anything else.
Thanks a lot!

I have reworked a bit the module used for the tests of the new
extended routine (with new tests for Alloc, AllocZero and AllocHuge as
well) and pushed it here:
https://github.com/michaelpq/pg_plugins/tree/master/mcxtalloc_test
This is just to mention it for the sake of the archives, I cannot
really believe that it should be an in-core module in src/test/modules
as it does allocations of 1GB in environments where there is enough
memory. Note that it contains regression tests with alternate outputs
depending on the environment where they are run (still output may not
be stable depending on where those tests are run, particularly where
memory usage varies a lot).
-- 
Michael



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Streaming replication and WAL archive interactions