Szerző: Philip Hazel Dátum: Címzett: Graycode CC: pcre-dev Tárgy: Re: [pcre-dev] Calculated match recursion stack size
On Thu, 19 Jan 2012, Graycode wrote:
> > I have just committed some experimental code. Are you in a position to
> > test it by checking out the trunk?
>
> Super! But I won't be able to try anything until tomorrow.
> I'm not wise in checkout methods, so I'll probably download the
> tarball from vcs.pcre.org and work from there.
I have committed an even simpler implementation, but I am unhappy about
the figures it's giving me on this Linux box[*], so I have made it a bit
more obscure. You have to run "pcretest -m -C" to make it show the
value. And the output now uses the word "approximate".
[*] Adding more than a certain number of printf statements increased the
apparent frame size; being simple-minded, I don't really understand why.
I guess the ways of gcc are mysterious.
While googling around to see if anybody had posted anything about stack
frame sizes, I discovered that gcc 4.6 has an option --fstack-size that
causes it to output the max stack size for each function. I am not yet
running 4.6, but when it eventually arrives, this option might be
helpful, and could confirm (or not) the output from the experimental
code just committed.