# Does cuMemCreate function create contiguous physical memory location?

**URL:** <https://forums.developer.nvidia.com/t/does-cumemcreate-function-create-contiguous-physical-memory-location/257542>\
**Category:** CUDA Programming and Performance\
**Tags:** cuda\
**Created:** [June 22, 2023, 6:43pm UTC](https://forums.developer.nvidia.com/t/does-cumemcreate-function-create-contiguous-physical-memory-location/257542 "2023-06-22T18:43:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonyJK1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@anthonyJK1](https://forums.developer.nvidia.com/u/anthonyJK1)\
**Post date:** [June 22, 2023, 6:43pm UTC](https://forums.developer.nvidia.com/t/does-cumemcreate-function-create-contiguous-physical-memory-location/257542/1 "2023-06-22T18:43:44Z")

</div>

Hello,

I was reading about the cuMemCreate function and I saw that it returns a handle for the memory allocated. Is that physical allocated memory contiguous?

Thank you

---

<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:** [June 23, 2023, 12:12am UTC](https://forums.developer.nvidia.com/t/does-cumemcreate-function-create-contiguous-physical-memory-location/257542/2 "2023-06-23T00:12:06Z")

</div>

I don’t know that any sort of guarantee like that [is provided](https://developer.nvidia.com/blog/introducing-low-level-gpu-virtual-memory-management/). It is certainly possible that the underlying physical pages could be contiguous, but it is not guaranteed or necessary as far as I know.

Any sort of guarantee of contiguous physical pages would be contrary to the purpose of having a virtual memory system, and would have a higher potential to run into fragmentation problems.

It’s not clear that this should matter in any way to the functioning of the CUDA virtual memory system.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [July 7, 2023, 12:12am UTC](https://forums.developer.nvidia.com/t/does-cumemcreate-function-create-contiguous-physical-memory-location/257542/3 "2023-07-07T00:12:10Z")

</div>

Closed on July 7, 2023, 12:12am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
