Skip to content

use kokkos allocate when oldSize is zero

In vtkm/cont/internal/DeviceAdapterMemoryManager.cxx BufferInfo can be created using the default constructor with size = 0. Internals->memory and internals->container are then set to nullptr.

This causes the kokkos reallocator to throw a runtime exception.

Fix is to check if OldSize == 0 and call Allocate instead of Reallocate.

Edited by Abdelilah Essiari

Merge request reports