Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)
Дата
Msg-id CAEudQAo2CLsKDeSGWOvJVbnP8KiR8N9CK+Pkb1=sLDLWHdmbug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
Em qui., 11 de ago. de 2022 às 08:48, Alvaro Herrera <alvherre@alvh.no-ip.org> escreveu:
On 2022-Aug-11, Ranier Vilela wrote:

> According to:
> https://interrupt.memfault.com/blog/c-struct-padding-initialization

Did you actually read it?
Yes, today.
 

https://interrupt.memfault.com/blog/c-struct-padding-initialization#structure-zero-initialization

: This looks great! However, it’s not obvious (from looking at those snippets)
: what the value loaded into the padding region will be.
:
: The unfortunate answer is: it depends
:
: The C11 standard, chapter §6.2.6.1/6 says this:
:
: : When a value is stored in an object of structure or union type, including in a
: : member object, the bytes of the object representation that correspond to any
: : padding bytes take unspecified values.
Did you see the Strategy 3 table, { 0 } ?
 
regards,
Ranier Vilela

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)