zoukankan      html  css  js  c++  java
  • vm内存分割比例

    root@james-desktop:/opt/qt-everywhere/marvell/SDK/linux-2.6.31.8# diff .config-2g config-3g
    4c4
    < # Sun Jun 19 10:06:59 2011
    ---
    > # Sun Jun 19 10:06:32 2011
    363,364c363,364
    < # CONFIG_VMSPLIT_3G is not set
    < CONFIG_VMSPLIT_2G=y
    ---
    > CONFIG_VMSPLIT_3G=y
    > # CONFIG_VMSPLIT_2G is not set
    366c366
    < CONFIG_PAGE_OFFSET=0x80000000
    ---
    > CONFIG_PAGE_OFFSET=0xC0000000

    修改vmalloc.h

    #ifndef VMSPLIT_3G_OPT

    #define VMALLOC_END       (PAGE_OFFSET + 0x28000000)

    #else
    //lzm for 1G mem
    //org (PAGE_OFFSET + 0x28000000) 0x28000000是512M+128 E8000000

    //PAGE_OFFSET - 0x20000000 = 0xA0000000
    //1G Dram + 128 Vmalloc
    #ifdef VMSPLIT_3G_OPT

    #warning "VMSPLIT_3G_OPT only for 1G RAM, hacked by lingzheming"
    #define VMALLOC_END       (PAGE_OFFSET + 0x20000000 + 0x28000000)

    #endif

    arch/arm/Kconfig

    choice
        prompt "Memory split"
        default VMSPLIT_3G
        help
          Select the desired split between kernel and user memory.

          If you are not absolutely sure what you are doing, leave this
          option alone!

        config VMSPLIT_3G
            bool "3G/1G user/kernel split"
        config VMSPLIT_3G_OPT
            bool "hacked by lingzheming: 3G/1G user/kernel split(for full 1G low memory)"

        config VMSPLIT_2G
            bool "2G/2G user/kernel split"
        config VMSPLIT_1G
            bool "1G/3G user/kernel split"
    endchoice

    config PAGE_OFFSET
        hex
        default 0x40000000 if VMSPLIT_1G
        default 0x80000000 if VMSPLIT_2G
        default 0xA0000000 if VMSPLIT_3G_OPT
        default 0xC0000000

  • 相关阅读:
    LeetCode 3Sum Closest
    LeetCode Jump Game
    LeetCode Convert Sorted List to Binary Search Tree
    LeetCode Search for a Range
    LeetCode ZigZag Conversion
    sql server中主键列的插入问题
    php 联系电话验证(手机和固话)
    Update与Mysql、Sqlsever中的随机数
    Yii在nginx下多目录rewrite
    php后台判断ajax请求
  • 原文地址:https://www.cnblogs.com/cute/p/2084550.html
Copyright © 2011-2022 走看看