Re: Printing LSN made easy - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Printing LSN made easy
Date
Msg-id CAExHW5v+W26wsKWKbadD2na9wxz77E1K+Md1hHxeBR8vVyiHeQ@mail.gmail.com
Whole thread Raw
In response to Re: Printing LSN made easy  (Li Japin <japinli@hotmail.com>)
Responses Re: Printing LSN made easy
List pgsql-hackers
On Fri, Nov 27, 2020 at 9:51 PM Li Japin <japinli@hotmail.com> wrote:
>
> Hi,
>
> Here, we cannot use sizeof(but) to get the buf size, because it is a pointer, so it always
> 8 bytes on 64-bit or 4 bytes on 32-bit machine.

For an array, the sizeof() returns the size of memory consumed by the
array. See section "Application to arrays" at
https://en.wikipedia.org/wiki/Sizeof.
-- 
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: OpenSSL 3.0.0 compatibility
Next
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] [PATCH] Generic type subscripting