# Array size restriction in cudaMallocArray?

**URL:** <https://forums.developer.nvidia.com/t/array-size-restriction-in-cudamallocarray/697>\
**Category:** CUDA Programming and Performance\
**Created:** [May 9, 2007, 8:19pm UTC](https://forums.developer.nvidia.com/t/array-size-restriction-in-cudamallocarray/697 "2007-05-09T20:19:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_device](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@\_device](https://forums.developer.nvidia.com/u/_device)\
**Post date:** [May 9, 2007, 8:19pm UTC](https://forums.developer.nvidia.com/t/array-size-restriction-in-cudamallocarray/697/1 "2007-05-09T20:19:22Z")

</div>

Hello All,

I need to allocate a large one-dimensional array, say, of million numbers to further use it as a look up table with linear interpolation. but the largest array I could allocate was one of 65536 numbers, and to do that I had to allocate actually a two-dimensional array of 65536x2 size. Otherwise, cudaMallocArray() returns “invalid argument”… So are there any restriction on the array width/height parameters?

---

<div class="post-metadata">

**Author:** ![mfatica](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mfatica](https://forums.developer.nvidia.com/u/mfatica)\
**Post date:** [May 10, 2007, 12:12am UTC](https://forums.developer.nvidia.com/t/array-size-restriction-in-cudamallocarray/697/2 "2007-05-10T00:12:38Z")

</div>

There are limitations on the size of texture memory ( it was discussed in the forum few days ago).

If you want to allocate a big 1D array, use regular device memory and cudaMalloc.

Massimiliano

---

<div class="post-metadata">

**Author:** ![\_device](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@\_device](https://forums.developer.nvidia.com/u/_device)\
**Post date:** [May 10, 2007, 2:17am UTC](https://forums.developer.nvidia.com/t/array-size-restriction-in-cudamallocarray/697/3 "2007-05-10T02:17:01Z")

</div>

Got it, thanks. However as I understand, textures bound to the linear device memory do not support linear filtering, which would be very useful for interpolation…
