在CUDA中固定内存 [英] Pinned memory in CUDA

查看:164
本文介绍了在CUDA中固定内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在某处读到CUDA中的固定内存是稀缺源。什么是固定内存的上限?在windows中,在linux?

I read somewhere that pinned memory in CUDA is scarce source. What is upper bound on pinned memory? In windows, in linux?

推荐答案

固定内存只是系统中的物理RAM,不允许分页out由操作系统。因此,一旦被锁定,那么其他进程就不能使用该内存量(有效地减少可用于操作系统其余部分的内存池)。

Pinned memory is just physical RAM in your system that is set aside and not allowed to be paged out by the OS. So once pinned, that amount of memory becomes unavailable to other processes (effectively reducing the memory pool available to rest of the OS).

因此,最大可锁定内存由什么其他进程(其他应用程序,操作系统本身)竞争系统内存。什么进程同时在Windows或Linux中运行(例如,它们是否固定内存)将决定您可以在该特定时间锁定多少内存。

The maximum pinnable memory therefore is determined by what other processes (other apps, the OS itself) are competing for system memory. What processes are concurrently running in either Windows or Linux (e.g. whether they themselves are pinning memory) will determine how much memory is available for you to pin at that particular time.

这篇关于在CUDA中固定内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆