Re: inline newNode() - Mailing list pgsql-patches

From Karel Zak
Subject Re: inline newNode()
Date
Msg-id 20021010092216.B12665@zf.jcu.cz
Whole thread Raw
In response to Re: inline newNode()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Wed, Oct 09, 2002 at 12:12:12AM -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > OK, here is a version of newNode that is a macro.
>
> If you use memset() instead of MemSet(), I'm afraid you're going to blow
> off most of the performance gain this was supposed to achieve.
>
> > Does anyone have additional suggestions?  The only thing I can suggest
> > is to make a clear-memory version of palloc because palloc always calls
> > MemoryContextAlloc() so I can put it in there.  How does that sound?
>
> I do not think palloc should auto-zero memory.  Hard to explain why,
> but it just feels like a bad decision.  One point is that the MemSet

 Agree. The memory-management routine knows nothing about real memory
 usage - maybe is zeroize memory wanted in palloc caller, but maybe
 not.. The palloc() caller knows it better than plalloc(). If I good
 remember same discussion was long time ago in linux-kernel list and
 result was non-zeroize-memory.


    Karel


--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: inline newNode()
Next
From: Martijn van Oosterhout
Date:
Subject: EXPLAIN ANALYZE bug/patch