分类分类
关注+2011-07-12作者:清晨
# ./ngx_array_t_test
-------------------------------- create a new pool:
-------------------------------- pool = 0x860b020 .d .last = 0x860b048
.end = 0x860b420
.next = 0x0
.failed = 0 .max = 984
.current = 0x860b020
.chain = 0x0
.large = 0x0
.cleanup = 0x0
.log = 0x0 available pool memory = 984
-------------------------------- alloc an array from the pool:
-------------------------------- pool = 0x860b020 .d .last = 0x860b084
.end = 0x860b420
.next = 0x0
.failed = 0 .max = 984
.current = 0x860b020
.chain = 0x0
.large = 0x0
.cleanup = 0x0
.log = 0x0 available pool memory = 924
array = 0x860b048 .elts = 0x860b05c
.nelts = 10
.size = 4
.nalloc = 10
.pool = 0x860b020 elements: 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 4. 小结
本文针对nginx-1.0.4的容器——数组结构进行了较为全面的分析,包括数组相关数据结构,数组的创建、销毁,以及向数组中添加元素等。最后通过一个简单例子向读者展示nginx数组的创建、添加元素和销毁操作,同时借此向读者展示编译测试代码的方法。
敬请关注后续的分析。谢谢!
相关文章
更多+相同厂商
热门推荐
点击查看更多
点击查看更多
点击查看更多
说两句网友评论