Jan de Visser <j...@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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to