[EMAIL PROTECTED] writes:

> it is. did you notice the buffer is always
> just double sized which theoretically can
> lead to high memory use, even when not needed?

Yes, but it at most overallocates by a factor of 2.
The reason for doubling is to limit the total CPU cost
of allocating the resulting memory.

These days, any application likely to be running a GLR parser is far
more likely to be worried about CPU cost than about a mere
factor-of-two overallocatoin.  Hence it's worth trading space for time
here.


Reply via email to