Allocate results data memory only when actually necessary.