better alloc error checking in coneos sparse direct