检测内存页面大小 [英] detecting the memory page size

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

问题描述

是否存在使用C或C ++代码(以编程方式)检测内存页面大小的便携式方法?

Is there a portable way to detect (programmatically) the memory page size using C or C++ code ?

推荐答案

由于 Boost 很漂亮您可以使用 函数以检索内存页面大小.

Since Boost is a pretty portable library you could use mapped_region::get_page_size() function to retrieve the memory page size.

对于C ++ Standard,它没有这种可能性.

As for C++ Standard it gives no such a possibility.

这篇关于检测内存页面大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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