|
From: Danny S. <dan...@cl...> - 2003-10-07 18:36:33
|
----- Original Message ----- From: "Luke Dunstan" <cod...@ho...> To: <min...@li...> Sent: Tuesday, 7 October 2003 13:24 Subject: Re: [MinGW-dvlpr] _alloca/_chkstk?? > > ----- Original Message ----- > From: "Danny Smith" <dan...@cl...> > To: "mingw-dvlpr" <min...@li...> > Sent: Tuesday, October 07, 2003 6:08 PM > Subject: [MinGW-dvlpr] _alloca/_chkstk?? > > > > Does any one really know why GCC (and other windows compilers) insert > > code for checking stack when allocating more than a page? > > > > I can see where it would be useful with SEH exceptions (the OS throws an > > 0x80010001 exception if stack cannot be grown) but how else is needed? > > > > Danny > > http://msdn.microsoft.com/library/en-us/vccore98/HTML/_core_.2f.gs.asp > > I guess it is for efficiency to make page faults more predictable but it's > hard to imagine that it would have a significant effect. A number of smaller > stack frames could also cause a fault so I can't see that it would actually > be *needed* for correctness. Is there a particular reason to remove it > though, apart from when statically linking GCC-compiled objects with MSVC > programs or vice versa? Yes, it plays up with optimisation using -funit-at-a-time in CVS gcc, (I'm thinking of the undefined references to > __alloca). It could be useful to have a GCC equivalent of "/Gs" to > optionally disable this feature, if there isn't one already. -mno-stack-arg-probe turns it off. Danny > > Luke > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > MinGW-dvlpr mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-dvlpr |