On Sat, 21 Mar 1998, Bruce Momjian wrote:
> >
> >
> > Some things just require confirmation...can someone else (Thomas?) running
> > Linux comment on this before I apply it? I just find it kinda unexpected
> > to see something that doesn't work for SCO doesn't work for Linux too :)
>
> On BSDI, malloc man pages says:
>
> The allocated space is suitably aligned (after possible pointer coercion)
> for storage of any type of object.
>
> I don't believe this is a standard, and I think Linux may not follow it.
> I think I heard somewhere they don't. We certainly need to have this
> checked before use in a patch.
>
>
> --
> 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)
>
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.
realloc() returns a pointer to the newly allocated memory,
which is suitably aligned for any kind of variable and may
be different from ptr, or NULL if the request fails or if
size was equal to 0. If realloc() fails the original
block is left untouched - it is not freed or moved.
Marc Zuckman
marc@fallon.classyad.com
_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
_ Visit The Home and Condo MarketPlace _
_ http://www.ClassyAd.com _
_ _
_ FREE basic property listings/advertisements and searches. _
_ _
_ Try our premium, yet inexpensive services for a real _
_ selling or buying edge! _
_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_