kernel_t *make_new_kernel(size_t size, allocator_t &alc)
{
    kernel_t *k = alc.alloct<kernel_t>(1);
    k->size = size;
    k->state = alc.alloct<nfa_state_t*>(size);
    k->thist = alc.alloct<hidx_t>(size);
    k->prectbl = NULL;
    if (!stadfa) {
        k->tvers = alc.alloct<uint32_t>(size);
    }
    else {
        k->stacmd = NULL;
    }
    return k;
}
kernel_t *make_new_kernel(size_t size, allocator_t &alc)
{
    kernel_t *k = alc.alloct<kernel_t>(1);
    k->size = size;
    k->state = alc.alloct<nfa_state_t*>(size);
    k->thist = alc.alloct<hidx_t>(size);
    k->prectbl = NULL;
    if (!stadfa) {
        k->tvers = alc.alloct<uint32_t>(size);
    }
    else {
        k->stacmd = NULL;
    }
    return k;
}