Windows平台上是否有内存映射API,就像Linux上的mmap()一样? [英] Is there a memory mapping api on windows platform, just like mmap() on linux?

查看:329
本文介绍了Windows平台上是否有内存映射API,就像Linux上的mmap()一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个api可以进行内存映射,就像

Is there an api to do memory mapping, just like

mmap()

在Linux上吗?

推荐答案

取决于您确切要使用它的目的.如果要将现有文件映射到内存中,则内存支持映射的文件.它们还可以用于在进程之间共享内存(使用没有基础文件的命名映射对象). 如果要映射物理内存,尽管有一些技巧,但用户模式通常不支持这种方式.

Depends on what exactly you want to use it for. If you want to map existing files into memory, that's supported with memory-mapped files. They can also be used to share memory between processes (use named mapping object with no underlying file). If you want to map physical memory, that's generally not supported from user mode, although there are some tricks.

这篇关于Windows平台上是否有内存映射API,就像Linux上的mmap()一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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