开发者

pagesize and its ratio to 4096

开发者 https://www.devze.com 2022-12-26 04:54 出处:网络
Are there systems, where minimal page of memory (pagesize) has a size not divisible by 2, or by 1024, 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

精彩评论

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