max_depth = (depth > max_depth) ? depth : max_depth ;
}
- L_freq = xmalloc(sizeof(*L_freq) * 4 * max_depth);
- memset(L_freq, 0, sizeof(*L_freq) * 4 * max_depth);
+ L_freq = xcalloc(4 * max_depth, sizeof(L_freq[0]));
S_freq = L_freq + 1*max_depth;
LA_freq = L_freq + 2*max_depth;
max_depth = (depth > max_depth) ? depth : max_depth ;
}
- L_freq = xmalloc(sizeof(*L_freq) * 4 * max_depth);
- memset(L_freq, 0, sizeof(*L_freq) * 4 * max_depth);
+ L_freq = xcalloc(4 * max_depth, sizeof(L_freq[0]));
S_freq = L_freq + 1*max_depth;
LA_freq = L_freq + 2*max_depth;
max_depth = (depth > max_depth) ? depth : max_depth ;
}
- freq = xmalloc(sizeof(*freq) * 2 * max_depth);
- memset(freq, 0, sizeof(*freq) * 2 * max_depth);
+ freq = xcalloc(2 * max_depth, sizeof(freq[0]));
disp = freq + max_depth;
max_depth = (depth > max_depth) ? depth : max_depth ;
}
- freq = xmalloc(sizeof(*freq) * max_depth);
- memset(freq, 0, sizeof(*freq) * max_depth);
+ freq = xcalloc(max_depth, sizeof(freq[0]));
for (i = 0; i < n_all; ++i) {
ir_node *all = get_type_allocation(tp, i);