首页 > 其他 > 详细

nginx slab 申请大小与地址的对应关系

时间:2019-10-31 12:05:54      阅读:88      评论:0      收藏:0      [点我收藏+]
参考文章:https://www.cnblogs.com/jimodetiantang/p/9193858.html
//
连续申请共享内存时,128字节是系统之前申请的。 ctx->sh:0x7fff6f4c8000 // 系统申请的80字节,实际占用128字节 8 p1:0x7fff6f4c9040, p2:0x7fff6f4c9048,p3:0x7fff6f4c9050,p4:0x7fff6f4c9058,p5:0x7fff6f4c9060 32 p1:0x7fff6f4ca020, p2:0x7fff6f4ca040,p3:0x7fff6f4ca060,p4:0x7fff6f4ca080,p5:0x7fff6f4ca0a0 64 p1:0x7fff6f4cb000, p2:0x7fff6f4cb040,p3:0x7fff6f4cb080,p4:0x7fff6f4cb0c0,p5:0x7fff6f4cb100 128 p1:0x7fff6f4c8080, p2:0x7fff6f4c8100,p3:0x7fff6f4c8180,p4:0x7fff6f4c8200,p5:0x7fff6f4c8280 256 p1:0x7fff6f4cc000, p2:0x7fff6f4cc100,p3:0x7fff6f4cc200,p4:0x7fff6f4cc300,p5:0x7fff6f4cc400 512 p1:0x7fff6f4cd000, p2:0x7fff6f4cd200,p3:0x7fff6f4cd400,p4:0x7fff6f4cd600,p5:0x7fff6f4cd800 1024 p1:0x7fff6f4ce000, p2:0x7fff6f4ce400,p3:0x7fff6f4ce800,p4:0x7fff6f4cec00,p5:0x7fff6f4cf000 // 申请8字节页之后删除8字节页,然后连续申请,最后申请8字节 ctx->sh:0x7fff6f4c8000 // 系统申请的80字节,实际占用128字节 8 p1:0x7fff6f4c9040, p2:0x7fff6f4c9048,p3:0x7fff6f4c9050,p4:0x7fff6f4c9058,p5:0x7fff6f4c9060 32 p1:0x7fff6f4c9020, p2:0x7fff6f4c9040,p3:0x7fff6f4c9060,p4:0x7fff6f4c9080,p5:0x7fff6f4c90a0 64 p1:0x7fff6f4ca000, p2:0x7fff6f4ca040,p3:0x7fff6f4ca080,p4:0x7fff6f4ca0c0,p5:0x7fff6f4ca100 128 p1:0x7fff6f4c8080, p2:0x7fff6f4c8100,p3:0x7fff6f4c8180,p4:0x7fff6f4c8200,p5:0x7fff6f4c8280 256 p1:0x7fff6f4cb000, p2:0x7fff6f4cb100,p3:0x7fff6f4cb200,p4:0x7fff6f4cb300,p5:0x7fff6f4cb400 512 p1:0x7fff6f4cc000, p2:0x7fff6f4cc200,p3:0x7fff6f4cc400,p4:0x7fff6f4cc600,p5:0x7fff6f4cc800 1024 p1:0x7fff6f4cd000, p2:0x7fff6f4cd400,p3:0x7fff6f4cd800,p4:0x7fff6f4cdc00,p5:0x7fff6f4ce000 8 p1:0x7fff6f4cf040 // 申请8字节页后,free第一个8字节(p1)内容,最后申请的8字节覆盖在删除的8字节 ctx->sh:0x7fff6f4c8000 // 系统申请的80字节,实际占用128字节 8 p1:0x7fff6f4c9040, p2:0x7fff6f4c9048,p3:0x7fff6f4c9050,p4:0x7fff6f4c9058,p5:0x7fff6f4c9060 32 p1:0x7fff6f4ca020, p2:0x7fff6f4ca040,p3:0x7fff6f4ca060,p4:0x7fff6f4ca080,p5:0x7fff6f4ca0a0 64 p1:0x7fff6f4cb000, p2:0x7fff6f4cb040,p3:0x7fff6f4cb080,p4:0x7fff6f4cb0c0,p5:0x7fff6f4cb100 128 p1:0x7fff6f4c8080, p2:0x7fff6f4c8100,p3:0x7fff6f4c8180,p4:0x7fff6f4c8200,p5:0x7fff6f4c8280 256 p1:0x7fff6f4cc000, p2:0x7fff6f4cc100,p3:0x7fff6f4cc200,p4:0x7fff6f4cc300,p5:0x7fff6f4cc400 512 p1:0x7fff6f4cd000, p2:0x7fff6f4cd200,p3:0x7fff6f4cd400,p4:0x7fff6f4cd600,p5:0x7fff6f4cd800 1024 p1:0x7fff6f4ce000, p2:0x7fff6f4ce400,p3:0x7fff6f4ce800,p4:0x7fff6f4cec00,p5:0x7fff6f4cf000 8 p1:0x7fff6f4c9040

 

nginx slab 申请大小与地址的对应关系

原文:https://www.cnblogs.com/micoblog/p/11770149.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!