mike@thor.acc.stolaf.edu (Mike Haertel) (03/20/89)
I recently saw GNU egrep posted to comp.os.minix and something just occurred to me. Buried in the middle of dfa.c is a magic number 1024 that sets the limit to the sizes of certain tables. The effect of this number is that a certain table cache will never be allocated more than 1024 * (256 * sizeof (int)) bytes. For small (64K) machines this should be changed to something like (assuming 16 bit ints) 64. Otherwise egrep will think it can allocate lots of core and die horribly when it can't. This problem is unlikely to show up in typical use because most people don't write terribly complicated regexps. In any case I will fix it in the next release such that if allocation fails it will flush the transition cache and try again, and then die gracefully if it still can't allocate. As for why I didn't write the code to do it that way in the first place, I plead temporary insanity. -- Mike Haertel <mike@stolaf.edu> In Hell they run VMS.