Allocate waveform vector in the heap