ZeroCopy vs. Windows-Service - There can be only one!?! Problem using CUDA with Zerocopy in

Dear all,

my application uses the zerocopy memory model of CUDA (setting
the deviceflag cudaDeviceMapHost and allocating through
cudaHostAlloc(…, cudasHostAllocMapped)). So far, the
application is working great when called by commandline.

The problem arises when the application is run as Windows
Service. In that case cudaHostAlloc fails with “unknown error”.
As the commandline and the service run as the same user,
methought the same runtime environment is used (access rights,
etc). But unfortunately, this seems not to be the case.

It seems the service got problems allocating pagelocked memory
due to missing access rights. So, I loosened the access right for
the service to SERVICE_ALL_ACCESS and PROCESS_ALL_ACCESS, without
any change.

As I am not a windows-api guru, I appreciate even the smallest hint…

max