On Wed, Oct 09, 2002 at 12:12:12AM -0400, Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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 Zak <zakkr(at)zf(dot)jcu(dot)cz>
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
In response to
pgsql-hackers by date
|Next:||From: 韩近强||Date: 2002-10-10 12:12:50|
|Previous:||From: Michael Meskes||Date: 2002-10-10 07:05:26|
|Subject: Bison 1.50 was released|
pgsql-patches by date
|Next:||From: Martijn van Oosterhout||Date: 2002-10-10 09:20:54|
|Subject: EXPLAIN ANALYZE bug/patch|
|Previous:||From: Neil Conway||Date: 2002-10-10 06:51:16|
|Subject: Re: inline newNode()|