stack overflow bug in ofstream::operator<<
Tue Jun 28 20:31:00 GMT 2005
On Tue, 28 Jun 2005, Dave Korn wrote:
> ----Original Message----
> >From: Igor Pechtchanski
> >Sent: 28 June 2005 19:10
> Ok, I'm following you up to this point ...
> > Checking the stack size every time will introduce equal
> > overhead on both paths,
> ... but now you've lost me. How does checking the stack space make the
> alloca path take as long as the malloc path?
That's "equal overhead *on top* of the alloca/malloc costs".
> > but I'm not sure we can do better (besides, the overhead should be
> > pretty small -- a memory read followed by a pointer comparison).
> Umm, this is all completely lost in the noise next to the difference in
> execution times between malloc and alloca isn't it?
It is for malloc. Alloca is cheap enough that this may be noticeable.
|\ _,,,---,,_ email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ firstname.lastname@example.org
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
More information about the Cygwin-developers