On 03/05/12 11:16, Richard Henderson wrote:
On 03/05/2012 08:54 AM, Aldy Hernandez wrote:
    region_worklist =
      (struct tm_region **) xcalloc (sizeof (struct tm_region *),
-                                 n_basic_blocks + NUM_FIXED_BLOCKS + 2);
+                                 last_basic_block + NUM_FIXED_BLOCKS);

This is ok.

I was confused for a moment by the "worklist" variable name, which
suggests a queue.  I'd also suggest that you change to use a vec,
rather than callocing yourself, and would have caught the memory
error earlier.


r~

I thought there'd be a lot less overhead by callocing the value myself. Is the overhead negligible?

I can certainly make it a VEC in a follow up patch if you want, though I'll commit this now so I can at get Rainer and Torvald happy while I do so.

Aldy

Reply via email to