code:nseg - ikarishinjieva/unixV6-code-analyze-chs GitHub Wiki
- 输入n
- 返回 n/128 ,向上取整
- 常用于 计算 指定块数所占用的内存页数,参看内存管理
1767
1768 /*
1769 * Return the arg/128 rounded up.
1770 */
1771 nseg(n)
1772 {
1773
1774 return((n+127)>>7);
1775 }
1776 /* ------------------------- */
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799