Make sure we have enough memory to allocate the return list.