# Tesla failed to allocate 5GB memory

**URL:** <https://forums.developer.nvidia.com/t/tesla-failed-to-allocate-5gb-memory/37407>\
**Category:** CUDA Programming and Performance\
**Created:** [March 27, 2015, 9:16pm UTC](https://forums.developer.nvidia.com/t/tesla-failed-to-allocate-5gb-memory/37407 "2015-03-27T21:16:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiw](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Jiw](https://forums.developer.nvidia.com/u/Jiw)\
**Post date:** [March 27, 2015, 9:16pm UTC](https://forums.developer.nvidia.com/t/tesla-failed-to-allocate-5gb-memory/37407/1 "2015-03-27T21:16:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Robert\_Crovella](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/robert_crovella/32/14043_2.png) [@Robert\_Crovella](https://forums.developer.nvidia.com/u/Robert_Crovella)\
**Post date:** [March 31, 2015, 4:19pm UTC](https://forums.developer.nvidia.com/t/tesla-failed-to-allocate-5gb-memory/37407/2 "2015-03-31T16:19:08Z")

</div>

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.
