Skip site navigation (1) Skip section navigation (2)

Re: Win32: Minimising desktop heap usage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Win32: Minimising desktop heap usage
Date: 2007-10-23 15:54:16
Message-ID: 19055.1193154856@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Dave Page <dpage(at)postgresql(dot)org> writes:
> Tom Lane wrote:
>> So don't initialize a local variable unless
>> you're giving it an actually meaningful value.

> The downside is that we see a useless warning that, if sufficiently
> multiplied, might make it hard to see something we are interested in.

[ looks again... ]  Actually, I think you just proved my point for me.
The ZeroMemory call should go away, no?  (Does this mean that the
Windows builds fail to detect dereferencing NULL?  Bad if so.)

>> Hmm, is there any functional downside to this?  I suppose
>> SHGetSpecialFolderPath does some things that getenv does not...

> A good percentage of the special folder paths you might query with
> SHGetSpecialFolderPath() are not actually in the environment. APPDATA
> certainly is on XP, 2K3 and Vista though, and I've found MS KB articles
> referring to it being on 2K as well.

OK, in that case seems no problem.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Gregory StarkDate: 2007-10-23 15:54:39
Subject: Re: Win32: Minimising desktop heap usage
Previous:From: Dave PageDate: 2007-10-23 15:47:33
Subject: Re: Win32: Minimising desktop heap usage

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group