Re: Idea: closing the loop for "pg_ctl reload" - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Idea: closing the loop for "pg_ctl reload"
Date
Msg-id 1734.1425307849@sss.pgh.pa.us
Whole thread Raw
In response to Re: Idea: closing the loop for "pg_ctl reload"  (Jan de Visser <jan@de-visser.net>)
Responses Re: Idea: closing the loop for "pg_ctl reload"  (Jan de Visser <jan@de-visser.net>)
List pgsql-hackers
Jan de Visser <jan@de-visser.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



pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Join push-down support for foreign tables
Next
From: Kevin Grittner
Date:
Subject: Re: Idea: GSoC - Query Rewrite with Materialized Views