cbm_ac_table_bytes returns the approximate memory used by the goto table.
| 421 | |
| 422 | // cbm_ac_table_bytes returns the approximate memory used by the goto table. |
| 423 | int cbm_ac_table_bytes(const CBMAutomaton *ac) { |
| 424 | if (!ac) { |
| 425 | return 0; |
| 426 | } |
| 427 | return ac->num_states * ac->alpha_size * (int)sizeof(int); |
| 428 | } |