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

  • 相关阅读:
    Ext4文件系统架构分析(二)
    Ext4文件系统架构分析(一)
    STL容器与拷贝构造函数
    左值、右值与右值引用
    C++ 11右值引用
    读书笔记_Effective_C++_条款二十五: 考虑写出一个不抛出异常的swap函数
    《Effective C++》item25:考虑写出一个不抛异常的swap函数
    CC++ vector 构造函数 & 析构函数
    复制构造函数 与 赋值函数 的区别
    a++与++a
  • 原文地址:https://www.cnblogs.com/cute/p/2084550.html
Copyright © 2011-2022 走看看