Re: [HACKERS] patch for memory overrun on Linux(i386)

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] patch for memory overrun on Linux(i386)
Дата
Msg-id 199803220521.AAA05976@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] patch for memory overrun on Linux(i386)  (Marc Howard Zuckman <marc@fallon.classyad.com>)
Ответы Re: [HACKERS] patch for memory overrun on Linux(i386)  (Massimo Dal Zotto <dz@cs.unitn.it>)
Список pgsql-hackers
> >From the linux man page:
>  For calloc() and malloc(), the value returned is a pointer
>        to the allocated memory, which is suitably aligned for any
>        kind of variable, or NULL if the request fails.

OK, then why is electric fence telling him to make DOUBLEALIGN match
INTALIGN?  You would think that if this change made sense, we would be
having some Linux problems, but we don't.

---------------------------------------------------------------------------


#if ! defined(sco)
#define DOUBLEALIGN(LEN)\
        (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1))

#define MAXALIGN(LEN)\
        (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1))
#else
#define DOUBLEALIGN(LEN) INTALIGN(LEN)
#define MAXALIGN(LEN)    INTALIGN(LEN)
#endif



--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

Предыдущее
От: Marc Howard Zuckman
Дата:
Сообщение: Re: [HACKERS] patch for memory overrun on Linux(i386)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [QUESTIONS] How do I build libpgtcl?