From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Safe memory allocation functions |
Date: | 2015-01-31 11:36:37 |
Message-ID: | CAB7nPqR4K=CLiYs__JzVUV6Q_dE9Y0xPYSgDBDdhEcxMBXtGCg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jan 31, 2015 at 2:58 AM, Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-01-31 13:07:17 | Re: Streaming replication and WAL archive interactions |
Previous Message | Andres Freund | 2015-01-31 11:11:18 | Re: Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.) |