Add missing __host__ __device__ to the memory management functions.