• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 297,  comments - 15,  trackbacks - 0

            NAME
                   brk, sbrk - change data segment size

            SYNOPSIS
                   #include <unistd.h>

                   int brk(void *end_data_segment);

                   void *sbrk(intptr_t increment);

            DESCRIPTION
                   brk()  sets the end of the data segment to the value specified by end_data_segment,
                   when that value is reasonable, the system does have enough memory and  the  process
                   does not exceed its max data size (see setrlimit(2)).

                   sbrk() increments the program's data space by increment bytes.  sbrk() isn't a sys-
                   tem call, it is just a C library wrapper.  Calling sbrk() with an  increment  of  0
                   can be used to find the current location of the program break.

            RETURN VALUE
                   On  success,  brk()  returns zero, and sbrk() returns a pointer to the start of the
                   new area.  On error, -1 is returned, and errno is set to ENOMEM.

            CONFORMING TO
                   4.3BSD

                   brk() and sbrk() are not defined in the C Standard and  are  deliberately  excluded
                   from the POSIX.1 standard (see paragraphs B.1.1.1.3 and B.8.3.3).

            NOTES
                   Various  systems  use  various  types for the parameter of sbrk().  Common are int,
                   ssize_t, ptrdiff_t, intptr_t.  XPGv6 obsoletes this function.

            SEE ALSO
                   execve(2), getrlimit(2), malloc(3)

                The brk() and sbrk() functions are used to change the amount of memory
                allocated in a process's data segment. They do this by moving the loca-
                tion of the ``break''. The break is the first address after the end of  
                the process's uninitialized data segment (also known as the ``BSS'').


            brk and sbrk設置的是BSS里的邊界,具體什么是BSS呢
            bss = "Block Started by Symbol" (由符號啟始的區塊)

            Dennis Ritchie 曾說過:
            這個縮寫也許有其它說法,但事實上我們采用這個縮寫的本意是
            "Block Started by Symbol"。它是 FAP 上的偽指令,FAP
            (Fortran Assembly [-er?] Program) 是指 IBM 704-709-7090-7094
            這種機型的組譯器。這個指令可定義自己的標號,并且預留一定數目
            的字組空間。還有另一個偽指令 BES,是 "Block Ended by
            Symbol",跟 BSS 指令幾乎一樣,不同點在于標號是定義在預留字組
            空間尾端的地址 + 1 的地方。在這些機器上,Fortran 的數組是以反
            方向儲存,而且數組的索引是從 1 算起。

            這種用法是合理的,因為這跟 UNIX 上標準的程序加載器一樣,程序
            碼當中并非真的放入這一整塊預留空間,而是先用一個數目表示,在
            加載時才真的把所需的預留空間定出來。
            from:
            Linux man page and
            http://www.linuxforum.net/forum/gshowflat.php?Cat=&Board=linuxK&Number=300677&page=16&view=collapsed&sb=5&o=all&fpart=

            posted on 2010-02-18 19:23 chatler 閱讀(664) 評論(0)  編輯 收藏 引用 所屬分類: Linux_Coding
            <2009年4月>
            2930311234
            567891011
            12131415161718
            19202122232425
            262728293012
            3456789

            常用鏈接

            留言簿(10)

            隨筆分類(307)

            隨筆檔案(297)

            algorithm

            Books_Free_Online

            C++

            database

            Linux

            Linux shell

            linux socket

            misce

            • cloudward
            • 感覺這個博客還是不錯,雖然做的東西和我不大相關,覺得看看還是有好處的

            network

            OSS

            • Google Android
            • Android is a software stack for mobile devices that includes an operating system, middleware and key applications. This early look at the Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
            • os161 file list

            overall

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久精品无码一区二区三区| 久久男人中文字幕资源站| 久久综合狠狠综合久久97色| 青青草原综合久久| 99精品久久精品一区二区| 乱亲女H秽乱长久久久| 色欲久久久天天天综合网| 欧美久久一区二区三区| 精品久久久久成人码免费动漫| 久久久久久亚洲精品不卡 | 怡红院日本一道日本久久| 日产精品99久久久久久| 久久99精品久久久久久动态图| 久久国产精品99精品国产| 麻豆精品久久久一区二区| 久久99精品九九九久久婷婷| 久久综合鬼色88久久精品综合自在自线噜噜 | 久久亚洲国产成人精品无码区| 久久久久无码中| 中文字幕日本人妻久久久免费 | 欧美亚洲国产精品久久高清| 伊人久久精品无码二区麻豆| 精品国产一区二区三区久久久狼| 久久91精品国产91久久小草| 久久影院午夜理论片无码| 久久亚洲sm情趣捆绑调教| 99国产欧美久久久精品蜜芽| 国内精品久久久久久久涩爱| 久久狠狠爱亚洲综合影院| 色综合色天天久久婷婷基地| 亚洲人成无码网站久久99热国产 | 国产精品久久久久免费a∨| 久久精品亚洲日本波多野结衣| 精品午夜久久福利大片| 理论片午午伦夜理片久久| 激情伊人五月天久久综合| 久久无码人妻精品一区二区三区| 久久偷看各类wc女厕嘘嘘| 久久青青草原精品国产软件 | 久久综合久久性久99毛片| 精品少妇人妻av无码久久|