Lines Matching refs:size

21     size_t      size, total;  in nxt_sendbuf_mem_coalesce0()  local
25 total = sb->size; in nxt_sendbuf_mem_coalesce0()
39 size = b->mem.free - b->mem.pos; in nxt_sendbuf_mem_coalesce0()
41 if (size != 0) { in nxt_sendbuf_mem_coalesce0()
43 if (total + size > sb->limit) { in nxt_sendbuf_mem_coalesce0()
44 size = sb->limit - total; in nxt_sendbuf_mem_coalesce0()
46 if (size == 0) { in nxt_sendbuf_mem_coalesce0()
58 iov[n].iov_len = size; in nxt_sendbuf_mem_coalesce0()
61 iov[n].iov_len += size; in nxt_sendbuf_mem_coalesce0()
67 total += size; in nxt_sendbuf_mem_coalesce0()
68 last = b->mem.pos + size; in nxt_sendbuf_mem_coalesce0()
91 size_t size, total; in nxt_sendbuf_mem_coalesce() local
95 total = sb->size; in nxt_sendbuf_mem_coalesce()
109 size = b->mem.free - b->mem.pos; in nxt_sendbuf_mem_coalesce()
111 if (size != 0) { in nxt_sendbuf_mem_coalesce()
113 if (total + size > sb->limit) { in nxt_sendbuf_mem_coalesce()
114 size = sb->limit - total; in nxt_sendbuf_mem_coalesce()
118 if (nxt_slow_path(size == 0)) { in nxt_sendbuf_mem_coalesce()
132 sb->iobuf[n].iov_len = size; in nxt_sendbuf_mem_coalesce()
135 sb->iobuf[n].iov_len += size; in nxt_sendbuf_mem_coalesce()
141 total += size; in nxt_sendbuf_mem_coalesce()
142 last = b->mem.pos + size; in nxt_sendbuf_mem_coalesce()
156 sb->size = total; in nxt_sendbuf_mem_coalesce()
168 nxt_off_t size, last; in nxt_sendbuf_file_coalesce() local
174 total = sb->size; in nxt_sendbuf_file_coalesce()
180 size = b->file_end - b->file_pos; in nxt_sendbuf_file_coalesce()
182 if (total + size >= sb->limit) { in nxt_sendbuf_file_coalesce()
187 total += size; in nxt_sendbuf_file_coalesce()
188 last = b->file_pos + size; in nxt_sendbuf_file_coalesce()
203 file_start = sb->size; in nxt_sendbuf_file_coalesce()
204 sb->size = total; in nxt_sendbuf_file_coalesce()
214 size_t size, bsize, copied; in nxt_sendbuf_copy_coalesce() local
218 size = nxt_buf_mem_used_size(&b->mem); in nxt_sendbuf_copy_coalesce()
223 if (size > bsize && bm->pos == bm->free) { in nxt_sendbuf_copy_coalesce()
252 size = nxt_buf_mem_used_size(bm); in nxt_sendbuf_copy_coalesce()
254 if (size == 0 && nxt_buf_is_sync(b)) { in nxt_sendbuf_copy_coalesce()
258 n = c->io->send(c, bm->pos, nxt_min(size, limit)); in nxt_sendbuf_copy_coalesce()
278 if (size == 0 && nxt_buf_is_sync(b)) { in nxt_sendbuf_copy_coalesce()
284 return c->io->send(c, b->mem.pos, nxt_min(size, limit)); in nxt_sendbuf_copy_coalesce()
297 size_t size, bsize; in nxt_sendbuf_copy() local
307 size = b->mem.free - b->mem.pos; in nxt_sendbuf_copy()
308 size = nxt_min(size, bsize); in nxt_sendbuf_copy()
310 nxt_memcpy(bm->free, b->mem.pos, size); in nxt_sendbuf_copy()
312 *copied += size; in nxt_sendbuf_copy()
313 bm->free += size; in nxt_sendbuf_copy()
333 size_t size; in nxt_sendbuf_update() local
341 size = nxt_buf_used_size(b); in nxt_sendbuf_update()
343 if (size != 0) { in nxt_sendbuf_update()
349 if (sent < size) { in nxt_sendbuf_update()
369 sent -= size; in nxt_sendbuf_update()