(host code) malloc/new for device code access only works on devices/systems where that feature is available. Currently, this would be x86 systems with the HMM, or Grace with ATS feature. Here are a couple recent threads:
which also link to more info.