Home
last modified time | relevance | path

Searched refs:mem (Results 1 – 25 of 36) sorted by last modified time

12

/unit/src/
H A Dnxt_process.c526 buf->mem.free = nxt_cpymem(buf->mem.free, &nxt_ppid, sizeof(nxt_pid_t)); in nxt_process_whoami()
570 nxt_memcpy(&pid, buf->mem.pos, sizeof(nxt_pid_t)); in nxt_process_whoami_ok()
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_router_access_log.c216 *b->mem.free++ = '\0'; in nxt_router_access_log_open()
364 *b->mem.free++ = '\0'; in nxt_router_access_log_reopen_handler()
H A Dnxt_router.c2217 void *mem; in nxt_router_app_queue_init() local
2236 port->queue = mem; in nxt_router_app_queue_init()
2245 void *mem; in nxt_router_port_queue_init() local
2273 void *mem; in nxt_router_port_queue_map() local
2562 b->mem.free = nxt_cpymem(b->mem.free, skcf->listen->sockaddr, size); in nxt_router_listen_socket_rpc_create()
2666 p = in->mem.pos; in nxt_router_listen_socket_error()
2679 out->mem.free = nxt_sprintf(out->mem.free, out->mem.end, in nxt_router_listen_socket_error()
2685 nxt_debug(task, "%*s", out->mem.free - out->mem.pos, out->mem.pos); in nxt_router_listen_socket_error()
3878 b->mem.free = b->mem.pos + resp->piggyback_content_length; in nxt_router_response_ready_handler()
3881 b->mem.pos = b->mem.free; in nxt_router_response_ready_handler()
[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_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_unit.c430 void *mem; in nxt_unit_init() local
444 mem = MAP_FAILED; in nxt_unit_init()
517 nxt_port_queue_init(mem); in nxt_unit_init()
571 if (mem != MAP_FAILED) { in nxt_unit_init()
1170 void *mem; in nxt_unit_process_new_port() local
3762 mm->hdr = mem; in nxt_unit_new_mmap()
3763 hdr = mem; in nxt_unit_new_mmap()
4016 hdr = mem; in nxt_unit_incoming_mmap()
5092 void *mem; in nxt_unit_ctx_alloc() local
5138 nxt_port_queue_init(mem); in nxt_unit_ctx_alloc()
[all …]
H A Dnxt_port_socket.c214 b->mem.pos = b->mem.free; in nxt_port_socket_write2()
277 size = nxt_buf_mem_used_size(&b->mem); in nxt_port_enqueue_buf()
280 nxt_memcpy(qbuf, b->mem.pos, size); in nxt_port_enqueue_buf()
291 mm->size = nxt_buf_mem_used_size(&b->mem); in nxt_port_enqueue_buf()
649 b->mem.pos += sent; in nxt_port_buf_completion()
660 b->mem.pos = b->mem.free; in nxt_port_buf_completion()
755 iov[1].iov_base = b->mem.pos; in nxt_port_read_handler()
907 iov[1].iov_base = b->mem.pos; in nxt_port_queue_read_handler()
1190 b->mem.free += msg->size; in nxt_port_read_msg_process()
1313 b->mem.pos = b->mem.start; in nxt_port_buf_alloc()
[all …]
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_port_memory.c149 if (b->is_port_mmap_sent && b->mem.pos > b->mem.start) { in nxt_port_mmap_buf_completion()
166 "%PI->%PI,%d,%d", b, b->mem.start, b->mem.end - b->mem.start, in nxt_port_mmap_buf_completion()
233 hdr = mem; in nxt_port_incoming_port_mmap()
585 b->mem.pos = b->mem.start; in nxt_port_mmap_get_buf()
586 b->mem.free = b->mem.start; in nxt_port_mmap_get_buf()
587 b->mem.end = b->mem.start + nchunks * PORT_MMAP_CHUNK_SIZE; in nxt_port_mmap_get_buf()
590 b, b->mem.start, b->mem.end - b->mem.start, in nxt_port_mmap_get_buf()
695 b->mem.pos = b->mem.start; in nxt_port_mmap_get_incoming_buf()
696 b->mem.free = b->mem.start + mmap_msg->size; in nxt_port_mmap_get_incoming_buf()
697 b->mem.end = b->mem.start + nchunks * PORT_MMAP_CHUNK_SIZE; in nxt_port_mmap_get_incoming_buf()
[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);
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_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_buf_pool.h48 && (bp)->current->mem.free < (bp)->current->mem.end))
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_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_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_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_port.c244 b->mem.free += sizeof(nxt_port_msg_new_port_t); in nxt_port_send_port()
245 msg = (nxt_port_msg_new_port_t *) b->mem.pos; in nxt_port_send_port()
268 new_port_msg = (nxt_port_msg_new_port_t *) msg->buf->mem.pos; in nxt_port_new_port_handler()
398 b->mem.free = nxt_cpymem(b->mem.free, &slot, sizeof(nxt_uint_t)); in nxt_port_change_log_file()
418 slot = *(nxt_uint_t *) b->mem.pos; in nxt_port_change_log_file_handler()
444 dump_size = b->mem.free - b->mem.pos; in nxt_port_data_handler()
450 nxt_debug(task, "data: %*s", dump_size, b->mem.pos); in nxt_port_data_handler()
492 buf->mem.free = nxt_cpymem(buf->mem.free, &pid, sizeof(pid)); in nxt_port_remove_notify_others()
511 nxt_memcpy(&pid, buf->mem.pos, sizeof(nxt_pid_t)); in nxt_port_remove_pid_handler()
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_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_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_sendbuf.c39 size = b->mem.free - b->mem.pos; in nxt_sendbuf_mem_coalesce0()
51 if (b->mem.pos != last) { in nxt_sendbuf_mem_coalesce0()
57 iov[n].iov_base = b->mem.pos; in nxt_sendbuf_mem_coalesce0()
68 last = b->mem.pos + size; in nxt_sendbuf_mem_coalesce0()
109 size = b->mem.free - b->mem.pos; in nxt_sendbuf_mem_coalesce()
123 if (b->mem.pos != last) { in nxt_sendbuf_mem_coalesce()
142 last = b->mem.pos + size; in nxt_sendbuf_mem_coalesce()
218 size = nxt_buf_mem_used_size(&b->mem); in nxt_sendbuf_copy_coalesce()
307 size = b->mem.free - b->mem.pos; in nxt_sendbuf_copy()
352 b->mem.pos += sent; in nxt_sendbuf_update()
[all …]
H A Dnxt_solaris_sendfilev.c122 pos = (uintptr_t) b->mem.pos; in nxt_solaris_buf_coalesce()
123 size = b->mem.free - b->mem.pos; in nxt_solaris_buf_coalesce()
H A Dnxt_stream_source.c311 b->mem.pos = in->mem.free; in nxt_stream_source_process_buffers()
312 b->mem.start = in->mem.free; in nxt_stream_source_process_buffers()
317 in->mem.free += nbytes; in nxt_stream_source_process_buffers()
319 b->mem.free = in->mem.free; in nxt_stream_source_process_buffers()
320 b->mem.end = in->mem.free; in nxt_stream_source_process_buffers()
325 in->mem.free = in->mem.end; in nxt_stream_source_process_buffers()
327 b->mem.free = in->mem.free; in nxt_stream_source_process_buffers()
328 b->mem.end = in->mem.free; in nxt_stream_source_process_buffers()
361 parent->mem.pos = b->mem.pos; in nxt_stream_source_buf_completion()
367 parent->mem.pos = parent->mem.start; in nxt_stream_source_buf_completion()
[all …]

12