Home
last modified time | relevance | path

Searched refs:mem (Results 1 – 25 of 36) sorted by path

12

/unit/src/
H A Dnxt_application.c290 p = b->mem.free; in nxt_discovery_modules()
291 end = b->mem.end; in nxt_discovery_modules()
324 b->mem.free = p; in nxt_discovery_modules()
H A Dnxt_buf.c47 b->mem.pos = b->mem.start; in nxt_buf_mem_alloc()
48 b->mem.free = b->mem.start; in nxt_buf_mem_alloc()
49 b->mem.end = b->mem.start + size; in nxt_buf_mem_alloc()
78 b->mem.pos = b->mem.start; in nxt_buf_mem_ts_alloc()
79 b->mem.free = b->mem.start; in nxt_buf_mem_ts_alloc()
80 b->mem.end = b->mem.start + size; in nxt_buf_mem_ts_alloc()
113 b->mem.pos = b->mem.start; in nxt_buf_file_alloc()
114 b->mem.free = b->mem.start; in nxt_buf_file_alloc()
115 b->mem.end = b->mem.start + size; in nxt_buf_file_alloc()
187 length += b->mem.free - b->mem.pos; in nxt_buf_chain_length()
[all …]
H A Dnxt_buf.h92 nxt_buf_mem_t mem; member
104 #define NXT_BUF_SYNC_SIZE offsetof(nxt_buf_t, mem.free)
117 ((b)->mem.pos != NULL)
211 nxt_buf_mem_used_size(&(b)->mem))
250 nxt_memcpy(b->mem.free, src, length); in nxt_buf_cpy()
251 b->mem.free += length; in nxt_buf_cpy()
H A Dnxt_buf_filter.c140 if (b != NULL && b->mem.pos == b->mem.free) { in nxt_buf_filter()
376 if (b->mem.pos == b->mem.free) { in nxt_buf_filter_file_job_completion()
H A Dnxt_buf_pool.c17 if (b != NULL && b->mem.free < b->mem.end) { in nxt_buf_pool_mem_alloc()
57 if (b != NULL && b->mem.free < b->mem.end) { in nxt_buf_pool_file_alloc()
136 nxt_thread_log_debug("buf pool free: %p %p", b, b->mem.start); in nxt_buf_pool_free()
138 size = nxt_buf_mem_size(&b->mem); in nxt_buf_pool_free()
141 nxt_mem_unmap(b->mem.start, &b->mmap, size); in nxt_buf_pool_free()
156 b->mem.pos = NULL; in nxt_buf_pool_free()
157 b->mem.free = NULL; in nxt_buf_pool_free()
158 nxt_buf_mem_set_size(&b->mem, size); in nxt_buf_pool_free()
161 b->mem.pos = b->mem.start; in nxt_buf_pool_free()
162 b->mem.free = b->mem.start; in nxt_buf_pool_free()
H A Dnxt_buf_pool.h48 && (bp)->current->mem.free < (bp)->current->mem.end))
H A Dnxt_cert.c1020 if (nxt_slow_path(size > (size_t) nxt_buf_mem_free_size(&b->mem))) {
1021 b->mem.free = b->mem.start;
1025 b->mem.free = nxt_cpymem(b->mem.free, de->d_name, size);
1031 if (nxt_slow_path(nxt_buf_mem_free_size(&b->mem) != 0)) {
1080 *b->mem.free++ = '\0'; in nxt_cert_store_get()
1163 name.start = msg->buf->mem.pos; in nxt_cert_store_get_handler()
1202 *b->mem.free++ = '\0'; in nxt_cert_store_delete()
1241 name.start = msg->buf->mem.pos; in nxt_cert_store_delete_handler()
H A Dnxt_conn_proxy.c405 wb->mem.pos = rb->mem.pos; in nxt_conn_proxy_read_process()
406 wb->mem.free = rb->mem.free; in nxt_conn_proxy_read_process()
407 wb->mem.start = rb->mem.pos; in nxt_conn_proxy_read_process()
408 wb->mem.end = rb->mem.free; in nxt_conn_proxy_read_process()
410 rb->mem.pos = rb->mem.free; in nxt_conn_proxy_read_process()
483 prev->mem.free = b->mem.end; in nxt_conn_proxy_write_add()
484 prev->mem.end = b->mem.end; in nxt_conn_proxy_write_add()
598 rb->mem.pos = wb->mem.start; in nxt_conn_proxy_write_process()
601 rb->mem.end = wb->mem.pos; in nxt_conn_proxy_write_process()
603 wb->mem.start = wb->mem.pos; in nxt_conn_proxy_write_process()
[all …]
H A Dnxt_controller.c600 b->mem.free = nxt_cpymem(b->mem.pos, &size, sizeof(size_t)); in nxt_controller_conf_send()
800 b->mem.free = nxt_cpymem(b->mem.free, c->read->mem.pos, preread); in nxt_controller_conn_read()
914 if (b->mem.pos != b->mem.free) { in nxt_controller_conn_write()
1940 b->mem.free = nxt_cpymem(b->mem.pos, &size, sizeof(size_t)); in nxt_controller_conf_store()
2073 body->mem.free = nxt_cpymem(body->mem.free, "\r\n", 2); in nxt_controller_response()
2093 b->mem.free = nxt_cpymem(b->mem.free, str.start, str.length); in nxt_controller_response()
2094 b->mem.free = nxt_cpymem(b->mem.free, status_line.start, in nxt_controller_response()
2101 b->mem.free = nxt_cpymem(b->mem.free, str.start, str.length); in nxt_controller_response()
2110 b->mem.free = nxt_cpymem(b->mem.free, str.start, str.length); in nxt_controller_response()
2112 b->mem.free = nxt_sprintf(b->mem.free, b->mem.end, "%uz", in nxt_controller_response()
[all …]
H A Dnxt_cyassl.c361 ret = CyaSSL_read(ssltls->session, b->mem.free, in nxt_cyassl_conn_io_read()
362 b->mem.end - b->mem.free); in nxt_cyassl_conn_io_read()
367 c->socket.fd, b->mem.free, b->mem.end - b->mem.free, ret); in nxt_cyassl_conn_io_read()
371 b->mem.free += ret; in nxt_cyassl_conn_io_read()
383 c->socket.fd, b->mem.free, in nxt_cyassl_conn_io_read()
384 b->mem.end - b->mem.free); in nxt_cyassl_conn_io_read()
H A Dnxt_event_conn_job_sendfile.c245 if (nxt_buf_is_mem(b) && b->mem.pos != b->mem.free) { in nxt_event_conn_job_sendfile_completion()
H A Dnxt_event_engine.c699 b->mem.start = nxt_pointer_to(b, NXT_BUF_MEM_SIZE); in nxt_event_engine_buf_mem_alloc()
700 b->mem.pos = b->mem.start; in nxt_event_engine_buf_mem_alloc()
701 b->mem.free = b->mem.start; in nxt_event_engine_buf_mem_alloc()
702 b->mem.end = b->mem.start + size; in nxt_event_engine_buf_mem_alloc()
714 size = NXT_BUF_MEM_SIZE + nxt_buf_mem_size(&b->mem); in nxt_event_engine_buf_mem_free()
728 nxt_debug(task, "buf completion: %p %p", b, b->mem.start); in nxt_event_engine_buf_mem_completion()
H A Dnxt_fastcgi_record_parse.c57 fp->pos = b->mem.pos; in nxt_fastcgi_record_parse()
59 while (fp->pos < b->mem.free) { in nxt_fastcgi_record_parse()
261 size = in->mem.free - p; in nxt_fastcgi_buffer()
268 in->mem.pos = p; in nxt_fastcgi_buffer()
283 b->mem.pos = p; in nxt_fastcgi_buffer()
284 b->mem.start = p; in nxt_fastcgi_buffer()
290 b->mem.free = p; in nxt_fastcgi_buffer()
291 b->mem.end = p; in nxt_fastcgi_buffer()
296 b->mem.free = in->mem.free; in nxt_fastcgi_buffer()
297 b->mem.end = in->mem.free; in nxt_fastcgi_buffer()
H A Dnxt_fastcgi_source.c225 size = b->mem.end - b->mem.free; in nxt_fastcgi_request_create()
230 p = b->mem.free; in nxt_fastcgi_request_create()
270 b->mem.free = nxt_cpymem(b->mem.free, param.buf, len); in nxt_fastcgi_request_create()
285 if (b->mem.end - b->mem.free >= 16) { in nxt_fastcgi_request_create()
289 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, in nxt_fastcgi_request_create()
302 nxt_memzero(b->mem.free, size); in nxt_fastcgi_request_create()
303 b->mem.free += size; in nxt_fastcgi_request_create()
307 if (b->mem.end - b->mem.free < 16) { in nxt_fastcgi_request_create()
308 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, b->mem.pos); in nxt_fastcgi_request_create()
325 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, b->mem.pos); in nxt_fastcgi_request_create()
[all …]
H A Dnxt_gnutls.c490 n = gnutls_record_recv(ssltls->session, b->mem.free, in nxt_gnutls_conn_io_read()
491 b->mem.end - b->mem.free); in nxt_gnutls_conn_io_read()
494 c->socket.fd, b->mem.free, b->mem.end - b->mem.free, n); in nxt_gnutls_conn_io_read()
498 b->mem.free += n; in nxt_gnutls_conn_io_read()
514 c->socket.fd, b->mem.free, in nxt_gnutls_conn_io_read()
515 b->mem.end - b->mem.free); in nxt_gnutls_conn_io_read()
H A Dnxt_h1proto.c329 b->mem.free = b->mem.pos; in nxt_http_conn_test()
725 b->mem.free = nxt_cpymem(b->mem.pos, in->mem.pos, used); in nxt_h1p_header_buffer_test()
920 b->mem.pos = b->mem.start; in nxt_h1p_request_body_read()
921 b->mem.free = b->mem.start; in nxt_h1p_request_body_read()
957 b->mem.free = nxt_cpymem(b->mem.free, in->mem.pos, size); in nxt_h1p_request_body_read()
1053 if (b->mem.pos == b->mem.free) { in nxt_h1p_conn_request_body_read()
1055 b->mem.free = b->mem.start; in nxt_h1p_conn_request_body_read()
1062 b->mem.pos = b->mem.free; in nxt_h1p_conn_request_body_read()
1537 header->mem.free = nxt_sprintf(header->mem.free, header->mem.end, in nxt_h1p_chunk_create()
1818 in->mem.pos = in->mem.start; in nxt_h1p_keepalive()
[all …]
H A Dnxt_h1proto_websocket.c150 nxt_memmove(in->mem.start, in->mem.pos, size); in nxt_h1p_websocket_frame_start()
152 in->mem.pos = in->mem.start; in nxt_h1p_websocket_frame_start()
153 in->mem.free = in->mem.start + size; in nxt_h1p_websocket_frame_start()
187 out->mem.start[0] = 0; in nxt_h1p_conn_ws_keepalive()
188 out->mem.start[1] = 0; in nxt_h1p_conn_ws_keepalive()
343 c->read->mem.end = c->read->mem.start + frame_size; in nxt_h1p_conn_ws_frame_header_read()
609 out->mem.start[0] = 0; in hxt_h1p_send_ws_error()
610 out->mem.start[1] = 0; in hxt_h1p_send_ws_error()
662 b->mem.pos += 2; in nxt_h1p_conn_ws_pong()
666 b->mem.pos += 4; in nxt_h1p_conn_ws_pong()
[all …]
H A Dnxt_http_chunk_parse.c51 hcp->pos = b->mem.pos; in nxt_http_chunk_parse()
53 while (hcp->pos < b->mem.free) { in nxt_http_chunk_parse()
207 size = in->mem.free - p; in nxt_http_chunk_buffer()
222 b->mem.pos = p; in nxt_http_chunk_buffer()
223 b->mem.start = p; in nxt_http_chunk_buffer()
229 b->mem.free = p; in nxt_http_chunk_buffer()
230 b->mem.end = p; in nxt_http_chunk_buffer()
235 b->mem.free = in->mem.free; in nxt_http_chunk_buffer()
236 b->mem.end = in->mem.free; in nxt_http_chunk_buffer()
256 nxt_debug(task, "buf completion: %p %p", b, b->mem.start); in nxt_http_chunk_buf_completion()
H A Dnxt_http_error.c92 out->mem.free = nxt_sprintf(out->mem.pos, out->mem.end, error, in nxt_http_request_send_error_body()
H A Dnxt_http_source.c159 b->mem.free = nxt_http_source_copy(b->mem.free, &hs->u.request.copy, in nxt_http_source_request_create()
160 b->mem.end - b->mem.free); in nxt_http_source_request_create()
166 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, in nxt_http_source_request_create()
167 b->mem.pos); in nxt_http_source_request_create()
180 nxt_thread_log_debug("\"%*s\"", b->mem.free - b->mem.pos, b->mem.pos); in nxt_http_source_request_create()
208 ret = nxt_http_status_parse(&hs->u.status_parse, &b->mem); in nxt_http_source_status_filter()
218 hs->u.status_parse.end - b->mem.start, b->mem.start); in nxt_http_source_status_filter()
250 if (b->parent->mem.pos == b->parent->mem.end) { in nxt_http_source_status_filter()
252 b->mem.pos - b->mem.start, b->mem.start); in nxt_http_source_status_filter()
464 if (nxt_buf_mem_used_size(&rest->mem) != 0) { in nxt_http_source_header_ready()
[all …]
H A Dnxt_http_static.c864 size = nxt_buf_mem_size(&b->mem); in nxt_http_static_buf_completion()
868 n = nxt_file_read(fb->file, b->mem.start, size, fb->file_pos); in nxt_http_static_buf_completion()
893 b->mem.pos = b->mem.start; in nxt_http_static_buf_completion()
894 b->mem.free = b->mem.pos + n; in nxt_http_static_buf_completion()
H A Dnxt_http_websocket.c50 wsh = (nxt_websocket_header_t *) r->ws_frame->mem.pos; in nxt_http_websocket_client()
63 used_size = nxt_buf_mem_used_size(&b->mem); in nxt_http_websocket_client()
79 buf->mem.free = nxt_cpymem(buf->mem.free, b->mem.pos, in nxt_http_websocket_client()
83 b->mem.pos += chunk_copy_size; in nxt_http_websocket_client()
91 if (nxt_buf_mem_used_size(&b->mem) == 0) { in nxt_http_websocket_client()
112 used_size = nxt_buf_mem_used_size(&b->mem); in nxt_http_websocket_client()
115 nxt_memmove(b->mem.start, b->mem.pos, used_size); in nxt_http_websocket_client()
117 b->mem.pos = b->mem.start; in nxt_http_websocket_client()
118 b->mem.free = b->mem.start + used_size; in nxt_http_websocket_client()
H A Dnxt_job_file.c99 size = nxt_buf_mem_size(&jbf->buffer->mem); in nxt_job_file_open_and_read()
249 jbf->buffer->mem.pos = p; in nxt_job_file_mmap()
250 jbf->buffer->mem.free = end; in nxt_job_file_mmap()
251 jbf->buffer->mem.start = p; in nxt_job_file_mmap()
252 jbf->buffer->mem.end = end; in nxt_job_file_mmap()
280 n = nxt_file_read(&jbf->file, jbf->buffer->mem.free, size, jbf->offset); in nxt_job_file_read_data()
284 jbf->buffer->mem.free += n; in nxt_job_file_read_data()
H A Dnxt_main_process.c335 nxt_buf_mem_used_size(&msg->buf->mem), msg->buf->mem.pos); in nxt_main_data_handler()
342 void *mem; in nxt_main_new_port_handler() local
356 port->queue = mem; in nxt_main_new_port_handler()
417 nxt_debug(task, "main start prototype: %*s", b->mem.free - b->mem.pos, in nxt_main_start_process_handler()
418 b->mem.pos); in nxt_main_start_process_handler()
428 start = b->mem.pos; in nxt_main_start_process_handler()
683 buf->mem.free = nxt_cpymem(buf->mem.free, &pid, sizeof(nxt_pid_t)); in nxt_main_process_whoami_handler()
1083 out->mem.free = nxt_cpymem(out->mem.free, ls.start, size); in nxt_main_port_socket_handler()
1328 b->mem.free - b->mem.pos, b->mem.pos); in nxt_main_port_modules_handler()
1330 conf = nxt_conf_json_parse(mp, b->mem.pos, b->mem.free, NULL); in nxt_main_port_modules_handler()
[all …]
H A Dnxt_openssl.c1341 size = b->mem.end - b->mem.free;
1343 ret = SSL_read(tls->session, b->mem.free, size);
1348 c->socket.fd, b->mem.free, size, ret, err);
1359 c->socket.fd, b->mem.free, size);

12