bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison glr feature request.


From: Paul Eggert
Subject: Re: Bison glr feature request.
Date: Fri, 09 Sep 2005 10:59:11 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden writes:

> It is about define YYFREE,YYMALLOC,YYREALLOC
> to other allocator and because of the realloc()
> the other allocator must keep track of how many
> bytes are allocated with every malloc() done.
>
> if only malloc()/free() is used thats not needed.

OK, I see.  However, I still think it's better to stick with realloc.
The burden on a debugger environment is small, as it's easy for such
an environment to implement realloc itself (all you need to do is
squirrel away the old size somewhere, and that's negligible overhead
in a debugging environment).  The runtime advantage of using realloc
over malloc+free in a production environment that caters go growing
buffers makes this all worth it.

> the realloc() in Bison GLR will always increase
> memory usage as can been seen, right ?

Yes, I think so.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]