Re: pgsql: Add new function dsa_allocate0.

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Robert Haas <rhaas(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add new function dsa_allocate0.
Date: 2017-02-16 22:34:45
Message-ID: CAEepm=1maeY16J2KTwjHvqgs5-5eT3OWYUbE9YqaaE8w5EEtFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Feb 17, 2017 at 7:02 AM, Robert Haas <rhaas(at)postgresql(dot)org> wrote:
> Add new function dsa_allocate0.
>
> This does the same thing as dsa_allocate, except that the memory
> is guaranteed to be zero-filled on return.
>
> Dilip Kumar, adjusted by me.
>
> Branch
> ------
> master
>
> Details
> -------
> http://git.postgresql.org/pg/commitdiff/9acb85597f1223ac26a5b19a9345849c43d0ff54
>
> Modified Files
> --------------
> src/backend/utils/mmgr/dsa.c | 16 ++++++++++++++++
> src/include/utils/dsa.h | 1 +
> 2 files changed, 17 insertions(+)

Hmm. This will segfault if you're out of memory.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2017-02-17 03:03:32 Re: pgsql: Add new function dsa_allocate0.
Previous Message Robert Haas 2017-02-16 18:02:51 pgsql: Add new function dsa_allocate0.

Browse pgsql-hackers by date

  From Date Subject
Next Message Amin Fallahi 2017-02-16 23:55:49 Implement custom join algorithm
Previous Message Tom Lane 2017-02-16 22:13:31 Re: Avoiding OOM in a hash join with many duplicate inner keys