Tesla failed to allocate 5GB memory

I installed a Tesla K40c on an enssembled PC, asus px979 pro motherboard, 32GB Ram, 4T Disk.
TCC driver is downloaded and opened.
However, when I tried to allocate a 5GB array by cudaMalloc, it failed.
It seems that there is still a memory limitation of 2GB.
Am I missing something?

Which operating system are you using?

Are you passing a proper unsigned long long quantity to the cudaMalloc operation?

It sounds like you are passing an int quantity.