ngx_config.h

数据对齐

#define ngx_align(d, a)     (((d) + (a - 1)) & ~(a - 1))

ngx_core.h

#define ngx_abs(value) (((value) >= 0) ? (value) : - (value))

#define ngx_max(val1, val2) ((val1 < val2) ? (val2) : (val1))

#define ngx_min(val1, val2) ((val1 > val2) ? (val2) : (val1))

数据结构

ngx_array

typedef struct {
void *elts;
ngx_uint_t nelts;
size_t size;
ngx_uint_t nalloc;
ngx_pool_t *pool;
} ngx_array_t;

ngx_palloc.h

内存池

typedef struct ngx_pool_cleanup_s ngx_pool_cleanup_t;

struct ngx_pool_cleanup_s {
ngx_pool_cleanup_pt handler;
void *data;
ngx_pool_cleanup_t *next;
};

typedef struct ngx_pool_large_s ngx_pool_large_t;

struct ngx_pool_large_s {
ngx_pool_large_t *next;
void *alloc;
};

typedef struct {
u_char *last;
u_char *end;
ngx_pool_t *next;
ngx_uint_t failed;
} ngx_pool_data_t;

struct ngx_pool_s {
ngx_pool_data_t d;
size_t max;
ngx_pool_t *current;
ngx_chain_t *chain;
ngx_pool_large_t *large;
ngx_pool_cleanup_t *cleanup;
ngx_log_t *log;
};

最新文章

  1. AngularJS基础入门初探
  2. 【原】迎接微信winphone 5.0 版本的IE10样式兼容
  3. 桌面 透明 三角形 分层窗口 DX
  4. ELK——在 CentOS/Linux 把 Kibana 3.0 部署在 Nginx 1.9.12
  5. android 事件处理概念簇
  6. NGif, Animated GIF Encoder for .NET
  7. ADO.net 扩展属性
  8. tmpfs
  9. java 切换
  10. cobbler部署
  11. HDU-1874 畅通工程续 (最短路径启蒙题)
  12. 关于java的环境变量的一点总结
  13. 遇到scan configurtation CDT builder等的错误
  14. SQL Server信息偏差影响表联结方式统计
  15. LeetCode(99):恢复二叉搜索树
  16. [leetcode]46. Permutations全排列(给定序列无重复元素)
  17. selenium捕捉视频
  18. 报错libtest: error while loading shared libraries: libuv.so.1: cannot open shared object file: No such file or directory
  19. django模板系统(上)
  20. css之-webkit-scrollbar

热门文章

  1. 结构体 内存对齐 keil &amp; STM32
  2. 用jQuery编写简单九宫格抽奖
  3. 使用XWAF框架(5)——XML解析器:CXDP
  4. 页面缓存优化系列一(expires,cache-control 解读)
  5. cmd命令操作Mysql数据库
  6. activemq的高级特性:消息持久订阅
  7. Linux查看当前登录用户并踢出用户
  8. js的组合函数
  9. html5手机浏览器启动微信客户端支付实例
  10. php composer 实现类的自动加载