Skip to content

call allocate when oldSize=0

Abdelilah Essiari requested to merge kokkos-memory-reallocation-fix into master

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.

Merge request reports

Loading