Re: Idea: closing the loop for "pg_ctl reload"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan de Visser <jan(at)de-visser(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Idea: closing the loop for "pg_ctl reload"
Date: 2015-03-02 14:50:49
Message-ID: 1734.1425307849@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan de Visser <jan(at)de-visser(dot)net> writes:
> 4/ Question: Can I assume pg_malloc allocated memory is set to zero? If not,
> is it OK to do a memset(..., 0, ...)? I don't have much experience on any of
> the esoteric platforms pgsql supports...

No, you need the memset. You might accidentally get already-zeroed memory
from malloc, but it's not something you can rely on.

However, you could and should use pg_malloc0, which takes care of that
for you...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2015-03-02 15:03:51 Re: Idea: GSoC - Query Rewrite with Materialized Views
Previous Message Thom Brown 2015-03-02 14:36:05 Re: Join push-down support for foreign tables