How to get linux kernel page size programmatically

前端 未结 7 1450
悲哀的现实
悲哀的现实 2021-01-31 07:56

I am working on a Linux module for IA64. My current problem is that the driver uses the PAGE_SIZE and PAGE_SHIFT macros for dma page allocation. The problem I am having is tha

7条回答
  •  不知归路
    2021-01-31 09:01

    You could just run a test, just mmap a file with different offsets and see which fail. Might be annoying in a kernel module though, but maybe there is some other test like that you could use.

提交回复
热议问题