# Does unified memory incur double transfer?

**URL:** <https://forums.developer.nvidia.com/t/does-unified-memory-incur-double-transfer/210410>\
**Category:** CUDA Programming and Performance\
**Tags:** cuda\
**Created:** [April 6, 2022, 1:21pm UTC](https://forums.developer.nvidia.com/t/does-unified-memory-incur-double-transfer/210410 "2022-04-06T13:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yukigaru](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yukigaru/32/13101_2.png) [@yukigaru](https://forums.developer.nvidia.com/u/yukigaru)\
**Post date:** [April 6, 2022, 1:21pm UTC](https://forums.developer.nvidia.com/t/does-unified-memory-incur-double-transfer/210410/1 "2022-04-06T13:21:09Z")

</div>

Hi!

There’s an illustration about differences between regular host and pinned memory transfers to GPU.

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/6/6/66723d79d54a153fa77024281f0425d567292e4a.jpeg)

That’s clear to me. But I’d like to understand:

1. does this extra copying via pinned buffer occurs when using managed memory?
2. if no, are CPU memory pages of managed memory pinned?

Thanks!

---

<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:** [April 6, 2022, 2:09pm UTC](https://forums.developer.nvidia.com/t/does-unified-memory-incur-double-transfer/210410/2 "2022-04-06T14:09:12Z")

</div>

I don’t think the behavior at this level of detail is published anywhere. It’s not relevant that I can see from a programmer’s perspective, and you have no direct control over it from a performance perspective. [I would not refer to a managed allocation as a pinned allocation](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-introduction). However, a pinned (“zero-copy”) allocation is [one of the possible realizations in certain circumstances](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-multi-gpu).

---

<div class="post-metadata">

**Author:** ![yukigaru](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yukigaru/32/13101_2.png) [@yukigaru](https://forums.developer.nvidia.com/u/yukigaru)\
**Post date:** [April 6, 2022, 2:15pm UTC](https://forums.developer.nvidia.com/t/does-unified-memory-incur-double-transfer/210410/3 "2022-04-06T14:15:10Z")

</div>

Well, I have control over choosing different types of memory, thus I’d like to know what’s internally involved in managed memory. Thanks!
