Questionable codes

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Questionable codes
Дата
Msg-id 19991214175454Y.t-ishii@sra.co.jp
обсуждение исходный текст
Ответы Re: [HACKERS] Questionable codes  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [HACKERS] Questionable codes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I have found a few questionable codings. I'm not sure if it really
hurts anything. Suggestions are welcome.

1) in storage/lmgr/lock.c: LockShmemSize()

size += MAXALIGN(maxBackends * sizeof(PROC));        /* each MyProc */
size += MAXALIGN(maxBackends * sizeof(LOCKMETHODCTL));        /* each

shouldn't be:

size += maxBackends * MAXALIGN(sizeof(PROC));        /* each MyProc */
size += maxBackends * MAXALIGN(sizeof(LOCKMETHODCTL));        /* each

2) in utils/hash/dynahash.c:hash_search():

Assert(saveState.currElem && !(saveState.currElem = 0));

Does anybody know what it is for?
--
Tatsuo Ishii


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

Предыдущее
От: Christof Petig
Дата:
Сообщение: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] Volunteer: Large Tuples / Tuple chaining