Improved CUDA mem usaged