Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法确定地址的前一页边界。
我知道我可以将下一页边界确定为
size = (size + PAGE_SIZE - 1) & ~PAGE_MASK;
但是我想移动到上一页边界(想减少长度)
谢谢, 拉姆
是的,
size &= ~PAGE_MASK;
将带您到向下舍入到上一页的大小。