logo       

RE: PATCH: add malloc function attribute to rts malloc functions: msg#00049

lang.haskell.glasgow.bugs

Subject: RE: PATCH: add malloc function attribute to rts malloc functions


> http://gcc.gnu.org/onlinedocs/gcc-3.3.3/gcc/Function-Attributes.html
> The gcc manual says:
>
> malloc
> The malloc attribute is used to tell the compiler that a
> function may be treated as if it were the malloc function. The
> compiler assumes that calls to malloc result in pointers that
> cannot alias anything. This will often improve optimization.
>
> Note the malloc attribute has only been around since gcc
> 3.xx, hence the
> extra GNUC3_ATTRIBUTE that tests for gcc version >= 3.
>
> So I guess it can't hurt and might even help. It even compiles! (as is
> running make in the rts directory does not fail - I've not done a full
> build.)

Committed; thanks!

Simon


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise