This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] alloca coding standard


On Nov 13,  3:36pm, Nick Duffek wrote:

> >I'd suggest to say how much is a "page", at least for a couple of
> >popular architectures.
> 
> I changed it to "1 page or 512 bytes, whichever is larger" so that
> developers needn't know the page size.

I think we ought to just pick a number (in bytes) and not mention
pages at all.  

The last time I checked, the default page size on Linux/IA-64 was
16KB.  It's possible to recompile the kernel to use 64KB pages.  My
point is that it would be possible for someone to submit patch using
alloca() which meets your proposed guidelines (on the architecture
upon which the patch was developed), but which aren't reasonable for
generic code.

Kevin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]