X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopyheur4.c;h=58e85adec1e73174bd0031bad00125ebc7b52049;hb=afbbc0b1ccd684c4c24bfd43d0f994123245f39f;hp=bfad18be767c92020a0419820d6edc95cac36dab;hpb=960fa89873d6fd56259d4b44d5ea9541335b0232;p=libfirm diff --git a/ir/be/becopyheur4.c b/ir/be/becopyheur4.c index bfad18be7..58e85adec 100644 --- a/ir/be/becopyheur4.c +++ b/ir/be/becopyheur4.c @@ -33,6 +33,8 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ +#define DISABLE_STATEV + #include #include "array.h" @@ -254,7 +256,7 @@ static int cmp_col_cost_gt(const void *a, const void *b) { * Creates a new affinity chunk */ static INLINE aff_chunk_t *new_aff_chunk(co_mst_env_t *env) { - aff_chunk_t *c = xmalloc(sizeof(*c) + (env->n_regs - 1) * sizeof(c->color_affinity[0])); + aff_chunk_t *c = XMALLOCF(aff_chunk_t, color_affinity, env->n_regs); c->n = NEW_ARR_F(const ir_node *, 0); c->interfere = NEW_ARR_F(const ir_node *, 0); c->weight = -1;