Re: Win32: Minimising desktop heap usage - Mailing list pgsql-patches

From Tom Lane
Subject Re: Win32: Minimising desktop heap usage
Date
Msg-id 19055.1193154856@sss.pgh.pa.us
Whole thread Raw
In response to Re: Win32: Minimising desktop heap usage  (Dave Page <dpage@postgresql.org>)
Responses Re: Win32: Minimising desktop heap usage  (Dave Page <dpage@postgresql.org>)
Re: Win32: Minimising desktop heap usage  (Magnus Hagander <magnus@hagander.net>)
List pgsql-patches
Dave Page <dpage@postgresql.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

pgsql-patches by date:

Previous
From: Dave Page
Date:
Subject: Re: Win32: Minimising desktop heap usage
Next
From: Gregory Stark
Date:
Subject: Re: Win32: Minimising desktop heap usage