开发者

pagesize and its ratio to 4096

Are there systems, where minimal page of memory (pagesize) has a size not divisible by 2, or by 1024, 4096?

Can it be 3000 or 3500?

Will any posix program break, if pagesize will be not divisible 开发者_运维技巧by 1024?


You can safely assume that pagesize is a power of 2, at least until ternary computers are used. In practice, modern systems will have a pagesize that is a multiple of 1024.

As for programs breaking, few programs are concerned about pagesize so as long as the kernel is consistent all is well. If a program did calculations based on pagesize and used headers with macros that assume pagesize is a power of two (truncpage,roundpage) then it would have problems.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜