免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1894 | 回复: 0
打印 上一主题 下一主题

书里关于Simple Segregated Storage的疑问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-22 08:52 |只看该作者 |倒序浏览
Computer Systems -- A Programmer’s Perspective书里:
Simple Segregated Storage
To allocate a block of some given size, we check the appropriate free list. If the list is not empty, we simply
allocate the first block in its entirety. Free blocks are never split to satisfy allocation requests. If the list is
empty, the allocator requests a fixed-sized chunk of additional memory from the operating system (typically
a multiple of the page size), divides the chunk into equal-sized blocks, and links the blocks together to form
the new free list. To free a block, the allocator simply inserts the block at the front of the appropriate free
list.

Further, the combination of the same-sized blocks in each chunk, no splitting,
and no coalescing means that there is very little per-block memory overhead. Since each chunk has only
same-sized blocks, the size of an allocated block can be inferred from its address
.

可是我还是想不明白怎么通过address来推断size,比如一个address是0x8000FF00,那它block size即可以是8bytes,也可以是16,32? 还是有什么其他的限制?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP