Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3801) use of "malloc" attribute in mem.h
Home

[Freeciv-Dev] Re: (PR#3801) use of "malloc" attribute in mem.h

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3801) use of "malloc" attribute in mem.h
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 26 Mar 2003 12:41:32 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, 26 Mar 2003, Rafa³ Bursig wrote:
> This code allow us use "malloc" attribute with
> fc_(malloc,calloc,realloc).
> Problem is that this attribute is avilable in gcc >= 3.x then we must
> have new fc_attribute_3x macro which check gcc version.
>
> I don't check it with gcc < 3.x then some good peoples could do it.

I can take this patch, but...
 1 - I don't think "fc_attribute_3x" is a good name. I'd prefer
"fc_gcc3_attribute" or something instead.
 2 - A comment should say in a few words what this malloc attribute does,
and why it is used. I am a bit uncertain about the effects of this myself.

  - Per




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#3801) use of "malloc" attribute in mem.h, Per I. Mathisen <=