nxt_buf.c (564:762f8c976ead) nxt_buf.c (608:d756231f2cb3)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 130 unchanged lines hidden (view full) ---

139}
140
141
142nxt_buf_t *
143nxt_buf_sync_alloc(nxt_mp_t *mp, nxt_uint_t flags)
144{
145 nxt_buf_t *b;
146
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 130 unchanged lines hidden (view full) ---

139}
140
141
142nxt_buf_t *
143nxt_buf_sync_alloc(nxt_mp_t *mp, nxt_uint_t flags)
144{
145 nxt_buf_t *b;
146
147 b = nxt_mp_zalloc(mp, NXT_BUF_SYNC_SIZE);
147 b = nxt_mp_zalloc(mp, NXT_BUF_MEM_SIZE);
148
149 if (nxt_fast_path(b != NULL)) {
150 b->data = mp;
151 b->completion_handler = nxt_buf_completion;
152
153 nxt_buf_set_sync(b);
154 b->is_nobuf = ((flags & NXT_BUF_SYNC_NOBUF) != 0);
155 b->is_flush = ((flags & NXT_BUF_SYNC_FLUSH) != 0);

--- 161 unchanged lines hidden ---
148
149 if (nxt_fast_path(b != NULL)) {
150 b->data = mp;
151 b->completion_handler = nxt_buf_completion;
152
153 nxt_buf_set_sync(b);
154 b->is_nobuf = ((flags & NXT_BUF_SYNC_NOBUF) != 0);
155 b->is_flush = ((flags & NXT_BUF_SYNC_FLUSH) != 0);

--- 161 unchanged lines hidden ---