applied malloc change to device and program info as well