http://linuxperf.com/?p=102





Memory Overcommit的意思是操作系统承诺给进程的内存大小超过了实际可用的内存。一个保守的操作系统不会允许memory overcommit,有多少就分配多少,再申请就没有了,这其实有些浪费内存,因为进程实际使用到的内存往往比申请的内存要少,比如某个进程malloc()了200MB内存,但实际上只用到了100MB,按照UNIX/Linux的算法,物理内存页的分配发生在使用的瞬间,而不是在申请的瞬间,也就是说未用到的100MB内存根本就没有分配,这100MB内存就闲置了。下面这个概念很重要,是理解memory overcommit的关键:commit(或overcommit)针对的是内存申请,内存申请不等于内存分配,内存只在实际用到的时候才分配。

Linux是允许memory overcommit的,只要你来申请内存我就给你,寄希望于进程实际上用不到那么多内存,但万一用到那么多了呢?那就会发生类似“银行挤兑”的危机,现金(内存)不足了。Linux设计了一个OOM killer机制(OOM = out-of-memory)来处理这种危机:挑选一个进程出来杀死,以腾出部分内存,如果还不够就继续杀…也可通过设置内核参数 vm.panic_on_oom 使得发生OOM时自动重启系统。这都是有风险的机制,重启有可能造成业务中断,杀死进程也有可能导致业务中断,我自己的这个小网站就碰到过这种问题,参见前文。所以Linux 2.6之后允许通过内核参数 vm.overcommit_memory 禁止memory overcommit。

内核参数 vm.overcommit_memory 接受三种取值:

0 – Heuristic overcommit handling. 这是缺省值,它允许overcommit,但过于明目张胆的overcommit会被拒绝,比如malloc一次性申请的内存大小就超过了系统总内存。Heuristic的意思是“试探式的”,内核利用某种算法(对该算法的详细解释请看文末)猜测你的内存申请是否合理,它认为不合理就会拒绝overcommit。 1 – Always overcommit. 允许overcommit,对内存申请来者不拒。
* 2 – Don’t overcommit. 禁止overcommit。

关于禁止overcommit (vm.overcommit_memory=2) ,需要知道的是,怎样才算是overcommit呢?kernel设有一个阈值,申请的内存总数超过这个阈值就算overcommit,在/proc/meminfo中可以看到这个阈值的大小:

 


# grep -i commit /proc/meminfo
<div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
    <span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">CommitLimit</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">:</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">5967744</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kB</span>
</div>

<div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
    <span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">Committed_AS</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">:</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">5363236</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kB</span>
</div>

    &nbsp;

    &nbsp;

    CommitLimit 就是overcommit的阈值,申请的内存总数超过CommitLimit的话就算是overcommit。

    这个阈值是如何计算出来的呢?它既不是物理内存的大小,也不是free memory的大小,它是通过内核参数vm.overcommit_ratio或vm.overcommit_kbytes间接设置的,公式如下:

    【CommitLimit = (Physical RAM * vm.overcommit_ratio / 100) + Swap】

    注:

    vm.overcommit_ratio 是内核参数,缺省值是50,表示物理内存的50%。如果你不想使用比率,也可以直接指定内存的字节数大小,通过另一个内核参数 vm.overcommit_kbytes 即可;

    如果使用了huge pages,那么需要从物理内存中减去,公式变成:

    CommitLimit = ([total RAM] &ndash; [total huge TLB RAM]) * vm.overcommit_ratio / 100 + swap

    参见[https://access.redhat.com/solutions/665023](https://access.redhat.com/solutions/665023)

    /proc/meminfo中的 Committed_AS 表示所有进程已经申请的内存总大小,(注意是已经申请的,不是已经分配的),如果 Committed_AS 超过&nbsp;CommitLimit 就表示发生了 overcommit,超出越多表示 overcommit 越严重。Committed_AS 的含义换一种说法就是,如果要绝对保证不发生OOM (out of memory) 需要多少物理内存。

    _&ldquo;sar -r&rdquo;是查看内存使用状况的常用工具,它的输出结果中有两个与overcommit有关,kbcommit 和 %commit:_

    _kbcommit对应/proc/meminfo中的 Committed_AS;_

    _%commit的计算公式并没有采用 CommitLimit作分母,而是Committed_AS/(MemTotal+SwapTotal),意思是_内存申请_占_物理内存与交换区之和_的百分比。_

<div data-settings=" minimize scroll-mouseover" style="color: rgb(43, 43, 43); font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; font-size: 12px !important; font-style: inherit; background-color: rgb(253, 253, 253) !important;">
    <div style="font-style: inherit; background-color: inherit;">
        <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
            <span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">$</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">sar</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">r</span>
        </div>

        <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
            &nbsp;
        </div>

        <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
            <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">05</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">:</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">00</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">:</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">01</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">PM<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbmemfree<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbmemused</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">%</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">memused<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbbuffers&nbsp;&nbsp;</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbcached&nbsp;&nbsp;</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbcommit</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">%</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">commit&nbsp;&nbsp;</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbactive&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbinact&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">kbdirty</span>
        </div>

        <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
            <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">05</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">:</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">10</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">:</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">01</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">PM</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">160576</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">3648460</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">95.78</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">1846212</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">4939368</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">62.74</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">1390292</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">1854880</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">4</span>
        </div>
    </div>
</div>

######
附:对Heuristic overcommit算法的解释

            内核参数 vm.overcommit_memory 的值0,1,2对应的源代码如下,其中heuristic overcommit对应的是OVERCOMMIT_GUESS:

        <div data-settings=" minimize scroll-mouseover" style="color: rgb(43, 43, 43); font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; font-size: 12px !important; font-style: inherit; background-color: rgb(253, 253, 253) !important;">
            <div style="font-style: inherit; background-color: inherit;">
                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    源文件:<span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">source</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">include</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">linux</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">mman</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">.</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">h</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    &nbsp;
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(184, 92, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">#define OVERCOMMIT_GUESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(184, 92, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">#define OVERCOMMIT_ALWAYS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(184, 92, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">#define OVERCOMMIT_NEVER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2</span>
                </div>
            </div>
        </div>

            Heuristic overcommit算法在以下函数中实现,基本上可以这么理解:

            单次申请的内存大小不能超过 【free memory + free swap +&nbsp;pagecache的大小 + SLAB中可回收的部分】,否则本次申请就会失败。

        <div data-settings=" minimize scroll-mouseover" style="font-family: Monaco, MonacoRegular, &quot;Courier New&quot;, monospace; font-size: 12px !important; font-style: inherit; background-color: rgb(253, 253, 253) !important;">
            <div style="font-style: inherit; background-color: inherit;">
                <div style="font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <font color="#ff0000" style="background-color: inherit;">源文件:<span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">source</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">mm</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">mmap</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">.</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">c</span>以<span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">RHEL</span>内核<span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">2.6.32</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-</span><span style="font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">642</span>为例</font>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    &nbsp;
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0120</span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0121&nbsp;&nbsp;* Check that a process has enough memory to allocate a new virtual</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0122&nbsp;&nbsp;* mapping. 0 means there is enough memory for the allocation to</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0123&nbsp;&nbsp;* succeed and -ENOMEM implies there is not.</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0124&nbsp;&nbsp;*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0125&nbsp;&nbsp;* We currently support three overcommit policies, which are set via the</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0126&nbsp;&nbsp;* vm.overcommit_memory sysctl.&nbsp;&nbsp;See Documentation/vm/overcommit-accounting</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0127&nbsp;&nbsp;*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0128&nbsp;&nbsp;* Strict overcommit modes added 2002 Feb 26 by Alan Cox.</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0129&nbsp;&nbsp;* Additional code 2002 Jul 20 by Robert Love.</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0130&nbsp;&nbsp;*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0131&nbsp;&nbsp;* cap_sys_admin is 1 if the process has admin privileges, 0 otherwise.</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0132&nbsp;&nbsp;*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0133&nbsp;&nbsp;* Note this is a helper function intended to be used by LSMs which</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0134&nbsp;&nbsp;* wish to use this logic.</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0135&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0136</span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">int</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">__vm_enough_memory</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">struct</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">mm_struct</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">*</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">mm</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">,</span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">long</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">,</span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">int</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">cap_sys_admin</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0137</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">{</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0138</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">unsigned</span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">long</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">,</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">allowed</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0139</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0140</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">vm_acct_memory</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0141</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0142</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0143&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Sometimes we want to use more memory than we have</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0145</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">sysctl_overcommit_memory</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">==</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">OVERCOMMIT_ALWAYS</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0146</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">return</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0147</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0148</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">sysctl_overcommit_memory</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">==</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">OVERCOMMIT_GUESS</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">{</span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">//Heuristic overcommit算法开始</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0149</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">unsigned</span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">long</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">n</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0150</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0151</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">=</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">global_page_state</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">NR_FILE_PAGES</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">//pagecache汇总的页面数量</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0152</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">+=</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">get_nr_swap_pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">//free swap的页面数</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0153</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0154</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Any slabs which are created with the</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0156&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* SLAB_RECLAIM_ACCOUNT flag claim to have contents</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* which are reclaimable, under pressure.&nbsp;&nbsp;The dentry</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* cache and most inode caches should fall into this</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0159&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0160</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">+=</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">global_page_state</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">NR_SLAB_RECLAIMABLE</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">//SLAB可回收的页面数</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0161</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0162</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Reserve some for root</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0165</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">!</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">cap_sys_admin</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0166</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-=</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">sysctl_admin_reserve_kbytes</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&gt;&gt;</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">PAGE_SHIFT</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">10</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">//给root用户保留的页面数</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0167</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0168</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&gt;</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0169</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">return</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0170</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0171</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* nr_free_pages() is very expensive on large systems,</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* only call if we&#39;re about to fail.</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0174&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0175</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">n</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">=</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">nr_free_pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">//当前free memory页面数</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0176</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0177</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Leave reserved pages. The pages are not for anonymous pages.</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0180</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">n</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&lt;=</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">totalreserve_pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0181</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">goto</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">error</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0182</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">else</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0183</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">n</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-=</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">totalreserve_pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0184</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0185</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0186&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Leave the last 3% for root</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0187&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0188</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">!</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">cap_sys_admin</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0189</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">n</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-=</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">n</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">32</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0190</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">+=</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">n</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0191</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0192</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">free</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&gt;</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0193</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">return</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0194</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0195</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">goto</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">error</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0196</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">}</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0197</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0198</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">allowed</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">=</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">vm_commit_limit</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0199</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/*</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Reserve some for root</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0202</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">!</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">cap_sys_admin</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0203</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">allowed</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-=</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">sysctl_admin_reserve_kbytes</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&gt;&gt;</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">PAGE_SHIFT</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">10</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0204</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0205</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/* Don&#39;t let a single process grow too big:</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;leave 3% of the size of this process for other processes */</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0207</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">mm</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0208</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">allowed</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-=</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">mm</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-&gt;</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">total_vm</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">/</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">32</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0209</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0210</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">if</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">percpu_counter_read_positive</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&amp;</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">vm_committed_as</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&lt;</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">allowed</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0211</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">return</span><span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0212</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">error</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">:</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0213</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">vm_unacct_memory</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">(</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">pages</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">)</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0214</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(247, 247, 247) !important;">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0215</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="background-color: inherit;">&nbsp;</span></span><span style="color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">return</span><span style="color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">-</span><span style="color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">ENOMEM</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">;</span>
                </div>

                <div style="color: rgb(0, 0, 0); font-family: inherit; font-size: inherit !important; font-style: inherit; font-weight: normal; background-color: rgb(253, 253, 253);">
                    <span style="color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">0216</span><span style="color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-style: inherit; background-color: inherit;">}</span>
                </div>
            </div>
        </div>

            &nbsp;

            参考:

            [https://www.kernel.org/doc/Documentation/vm/overcommit-accounting](https://www.kernel.org/doc/Documentation/vm/overcommit-accounting)

            [https://www.win.tue.nl/~aeb/linux/lk/lk-9.html](https://www.win.tue.nl/~aeb/linux/lk/lk-9.html)

            [https://www.kernel.org/doc/Documentation/sysctl/vm.txt](https://www.kernel.org/doc/Documentation/sysctl/vm.txt)

            [http://lwn.net/Articles/28345/](http://lwn.net/Articles/28345/)

    </div>
</div>