Made local_signal and local_sum heap-allocated.