Re: Avoid use deprecated Windows Memory API

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Avoid use deprecated Windows Memory API
Date: 2022-09-15 13:11:10
Message-ID: CAEudQApbe7LWASbi0+LWzHWKTmt_zHggscB836-cXKZGCbx8zA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera <
alvherre(at)alvh(dot)no-ip(dot)org> escreveu:

> On 2022-Sep-14, Ranier Vilela wrote:
>
> > According to:
> >
> https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localalloc
>
> > LocalAlloc is deprecated.
> > So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to
> > HeapAlloc.
>
> These functions you are patching are not in performance-sensitive code,
> so I doubt this makes any difference performance wise. I doubt
> Microsoft will ever remove these deprecated functions, given its history
> of backwards compatibility, so from that perspective this change does
> not achieve anything either.
>
If users don't adapt to the new API, the old one will never really expire.

> If you were proposing to change how palloc() allocates memory, that
> would be quite different and perhaps useful, as long as a benchmark
> accompanies the patch.
>
This is irrelevant to the discussion.
Neither the patch nor the thread deals with palloc.

regards,
Ranier Vilela

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-09-15 13:11:24 Re: Avoid use deprecated Windows Memory API
Previous Message Alvaro Herrera 2022-09-15 13:08:21 Re: pgsql: Doc: Explain about Column List feature.