Subject: Re: PR/33392 CVS commit: src/dist/nawk
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 07/26/2006 22:35:02
The following reply was made to PR bin/33392; it has been noted by GNATS.

From: christos@zoulas.com (Christos Zoulas)
To: Aleksey Cheusov <cheusov@tut.by>, gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: PR/33392 CVS commit: src/dist/nawk
Date: Wed, 26 Jul 2006 18:34:19 -0400

 On Jul 27, 12:23am, cheusov@tut.by (Aleksey Cheusov) wrote:
 -- Subject: Re: PR/33392 CVS commit: src/dist/nawk
 
 | You are right, both are correct.
 | 
 | Suppose
 | 1) we are here
 |     918         /* add tmpset to current set of states */
 |     919         ++(f->curstat);
 | +   920         resize_state(f, f->curstat);
 |     921         for (i = 0; i < NCHARS; i++)
 | 2) 100 states was already created and all tables was properly initialized, i.e.
 |    f->state_count == 2.
 | 3) f->curstat == 99
 | 
 | 1) + 2) + 3) ===> unnecessary memory allocation in resize_state(), just a few kbytes.
 |   Is there any reason for this?
 
 You need that because gototab[f->curstat] is referenced in 922. I don't
 claim to understand the meaning of the variables I am just looking how
 they are used.
 
 christos