check that allocation succeeded