日本a√视频在线,久久青青亚洲国产,亚洲一区欧美二区,免费g片在线观看网站

        <style id="k3y6c"><u id="k3y6c"></u></style>
        <s id="k3y6c"></s>
        <mark id="k3y6c"></mark>
          
          

          <mark id="k3y6c"></mark>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 多線程編程之:Linux線程編程

          多線程編程之:Linux線程編程

          作者: 時間:2013-09-13 來源:網(wǎng)絡(luò) 收藏


          本文引用地址:http://yuyingmama.com.cn/article/257101.htm

          接下來可以在線程運(yùn)行前后使用“free”命令查看內(nèi)存的使用情況。以下是運(yùn)行結(jié)果:


          $ ./thread_attr

          Create tread success

          Waiting for thread to finish...

          Thread is starting

          Waiting for thread to finish...

          Thread : job 0 delay = 3

          Waiting for thread to finish...

          Thread : job 1 delay = 2

          Waiting for thread to finish...

          Waiting for thread to finish...

          Waiting for thread to finish...

          Waiting for thread to finish...

          Thread : job 2 delay = 9

          Thread finished


          /* 程序運(yùn)行之前 */

          $ free

          total used free shared buffers cached

          Mem: 255556 191940 63616 10 5864 61360

          -/+ buffers/cache: 124716 130840

          Swap: 377488 18352 359136


          /* 程序運(yùn)行之中 */

          $ free

          total used free shared buffers cached

          Mem: 255556 191948 63608 10 5888 61336

          -/+ buffers/cache: 124724 130832

          Swap: 377488 18352 359136


          /* 程序運(yùn)行之后 */

          $ free

          total used free shared buffers cached

          Mem: 255556 191940 63616 10 5904 61320

          -/+ buffers/cache: 124716 130840

          Swap: 377488 18352 359136


          可以看到,線程在運(yùn)行結(jié)束后就收回了系統(tǒng)資源,并釋放內(nèi)存。

          linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)

          linux相關(guān)文章:linux教程



          上一頁 1 2 3 4 5 6 7 8 下一頁

          評論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉