miniflow_alloc(struct miniflow *dsts[], size_t n, const struct miniflow *src)
{
    size_t n_values = miniflow_n_values(src);
    size_t data_size = MINIFLOW_VALUES_SIZE(n_values);
    struct miniflow *dst = xmalloc(n * (sizeof *src + data_size));
    size_t i;

    COVERAGE_INC(miniflow_malloc);

    for (i = 0; i < n; i++) {
        *dst = *src;   /* Copy maps. */
        dsts[i] = dst;
        dst += 1;      /* Just past the maps. */
        dst = (struct miniflow *)((uint64_t *)dst + n_values); /* Skip data. */
    }
    return data_size;
}
miniflow_alloc(struct miniflow *dsts[], size_t n, const struct miniflow *src)
{
    size_t n_values = miniflow_n_values(src);
    size_t data_size = MINIFLOW_VALUES_SIZE(n_values);
    struct miniflow *dst = xmalloc(n * (sizeof *src + data_size));
    size_t i;

    COVERAGE_INC(miniflow_malloc);

    for (i = 0; i < n; i++) {
        *dst = *src;    
        dsts[i] = dst;
        dst += 1;       
        dst = (struct miniflow *)((uint64_t *)dst + n_values);  
    }
    return data_size;
}