[automaton] pool needn't be so large, methinks

This commit is contained in:
nick black 2021-10-01 19:34:29 -04:00 committed by nick black
parent 57e5981b9d
commit 57179a1c38

View File

@ -55,7 +55,7 @@ uint32_t esctrie_id(const esctrie* e){
static inline unsigned
create_esctrie_node(automaton* a, int special){
if(a->poolused == a->poolsize){
unsigned newsize = a->poolsize ? a->poolsize * 2 : 2048;
unsigned newsize = a->poolsize ? a->poolsize * 2 : 512;
esctrie* tmp = realloc(a->nodepool, sizeof(*a->nodepool) * newsize);
if(tmp == NULL){
return 0;