如何xcode学习nginx源码
1个回答
2014-12-17
展开全部
1、基本结构
先来学习一下nginx内存池的几个主要数据结构:[见:./src/core/ngx_palloc.h/.c]
ngx_pool_data_t(内存池数据块结构)
1: typedef struct {
2: u_char *last;
3: u_char *end;
4: ngx_pool_t *next;
5: ngx_uint_t failed;
6: } ngx_pool_data_t;
ngx_pool_s(内存池头部结构)
1: struct ngx_pool_s {
2: ngx_pool_data_t d;
3: size_t max;
4: ngx_pool_t *current;
5: ngx_chain_t *chain;
6: ngx_pool_large_t *large;
7: ngx_pool_cleanup_t *cleanup;
8: ngx_log_t *log;
9: };
先来学习一下nginx内存池的几个主要数据结构:[见:./src/core/ngx_palloc.h/.c]
ngx_pool_data_t(内存池数据块结构)
1: typedef struct {
2: u_char *last;
3: u_char *end;
4: ngx_pool_t *next;
5: ngx_uint_t failed;
6: } ngx_pool_data_t;
ngx_pool_s(内存池头部结构)
1: struct ngx_pool_s {
2: ngx_pool_data_t d;
3: size_t max;
4: ngx_pool_t *current;
5: ngx_chain_t *chain;
6: ngx_pool_large_t *large;
7: ngx_pool_cleanup_t *cleanup;
8: ngx_log_t *log;
9: };
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |