2
回答

哪位达人帮忙解释下?
ngx_chain_t out; b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); b->pos = some_bytes; //问题在这里,既然分配了内存,这里为啥不拷贝,只把指针指过去? b->last = some_bytes + some_bytes_length; b->memory = 1; b->last_buf = 1; out.buf = b; out.next = NULL; return ngx_http_output_filter(r, &out); ngx_buf_t *b;