detecting the memory page size

前端 未结 7 1982
野性不改
野性不改 2021-02-08 13:31

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

7条回答
  •  清歌不尽
    2021-02-08 14:08

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

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

提交回复
热议问题