/third_party/nghttp2/tests/ |
D | nghttp2_buf_test.c | 34 nghttp2_bufs bufs; in test_nghttp2_bufs_add() local 40 rv = nghttp2_bufs_init(&bufs, 1000, 3, mem); in test_nghttp2_bufs_add() 43 CU_ASSERT(bufs.cur->buf.pos == bufs.cur->buf.last); in test_nghttp2_bufs_add() 45 rv = nghttp2_bufs_add(&bufs, data, 493); in test_nghttp2_bufs_add() 47 CU_ASSERT(493 == nghttp2_buf_len(&bufs.cur->buf)); in test_nghttp2_bufs_add() 48 CU_ASSERT(493 == nghttp2_bufs_len(&bufs)); in test_nghttp2_bufs_add() 49 CU_ASSERT(507 == nghttp2_bufs_cur_avail(&bufs)); in test_nghttp2_bufs_add() 51 rv = nghttp2_bufs_add(&bufs, data, 507); in test_nghttp2_bufs_add() 53 CU_ASSERT(1000 == nghttp2_buf_len(&bufs.cur->buf)); in test_nghttp2_bufs_add() 54 CU_ASSERT(1000 == nghttp2_bufs_len(&bufs)); in test_nghttp2_bufs_add() [all …]
|
D | nghttp2_hd_test.c | 49 nghttp2_bufs bufs; in test_nghttp2_hd_deflate() local 56 frame_pack_bufs_init(&bufs); in test_nghttp2_hd_deflate() 62 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva1, ARRLEN(nva1)); in test_nghttp2_hd_deflate() 63 blocklen = (ssize_t)nghttp2_bufs_len(&bufs); in test_nghttp2_hd_deflate() 67 CU_ASSERT(blocklen == inflate_hd(&inflater, &out, &bufs, 0, mem)); in test_nghttp2_hd_deflate() 73 nghttp2_bufs_reset(&bufs); in test_nghttp2_hd_deflate() 76 rv = nghttp2_hd_deflate_hd_bufs(&deflater, &bufs, nva2, ARRLEN(nva2)); in test_nghttp2_hd_deflate() 77 blocklen = (ssize_t)nghttp2_bufs_len(&bufs); in test_nghttp2_hd_deflate() 81 CU_ASSERT(blocklen == inflate_hd(&inflater, &out, &bufs, 0, mem)); in test_nghttp2_hd_deflate() 87 nghttp2_bufs_reset(&bufs); in test_nghttp2_hd_deflate() [all …]
|
D | nghttp2_frame_test.c | 75 nghttp2_bufs bufs; in test_nghttp2_frame_pack_headers() local 85 frame_pack_bufs_init(&bufs); in test_nghttp2_frame_pack_headers() 99 rv = nghttp2_frame_pack_headers(&bufs, &frame, &deflater); in test_nghttp2_frame_pack_headers() 101 nghttp2_bufs_rewind(&bufs); in test_nghttp2_frame_pack_headers() 104 CU_ASSERT(nghttp2_bufs_len(&bufs) > 0); in test_nghttp2_frame_pack_headers() 105 CU_ASSERT(0 == unpack_framebuf((nghttp2_frame *)&oframe, &bufs)); in test_nghttp2_frame_pack_headers() 107 check_frame_header(nghttp2_bufs_len(&bufs) - NGHTTP2_FRAME_HDLEN, in test_nghttp2_frame_pack_headers() 114 hdblocklen = nghttp2_bufs_len(&bufs) - NGHTTP2_FRAME_HDLEN; in test_nghttp2_frame_pack_headers() 116 inflate_hd(&inflater, &out, &bufs, NGHTTP2_FRAME_HDLEN, mem)); in test_nghttp2_frame_pack_headers() 124 nghttp2_bufs_reset(&bufs); in test_nghttp2_frame_pack_headers() [all …]
|
D | failmalloc_test.c | 49 static void data_feed_init(data_feed *df, nghttp2_bufs *bufs) { in data_feed_init() argument 53 buf = &bufs->head->buf; in data_feed_init() 278 nghttp2_bufs bufs; in run_nghttp2_session_recv() local 292 rv = frame_pack_bufs_init(&bufs); in run_nghttp2_session_recv() 308 nghttp2_bufs_add(&bufs, NGHTTP2_CLIENT_MAGIC, NGHTTP2_CLIENT_MAGIC_LEN); in run_nghttp2_session_recv() 309 data_feed_init(&df, &bufs); in run_nghttp2_session_recv() 310 nghttp2_bufs_reset(&bufs); in run_nghttp2_session_recv() 327 nghttp2_frame_pack_settings(&bufs, &frame.settings); in run_nghttp2_session_recv() 329 data_feed_init(&df, &bufs); in run_nghttp2_session_recv() 330 nghttp2_bufs_reset(&bufs); in run_nghttp2_session_recv() [all …]
|
D | nghttp2_session_test.c | 102 nghttp2_bufs *bufs) { in scripted_data_feed_init2() argument 112 for (ci = bufs->head; ci; ci = ci->next) { in scripted_data_feed_init2() 665 nghttp2_bufs bufs; in test_nghttp2_session_recv() local 677 frame_pack_bufs_init(&bufs); in test_nghttp2_session_recv() 694 rv = nghttp2_frame_pack_headers(&bufs, &frame.headers, &deflater); in test_nghttp2_session_recv() 698 scripted_data_feed_init2(&df, &bufs); in test_nghttp2_session_recv() 700 framelen = nghttp2_bufs_len(&bufs); in test_nghttp2_session_recv() 718 nghttp2_bufs_reset(&bufs); in test_nghttp2_session_recv() 723 rv = nghttp2_frame_pack_priority(&bufs, &frame.priority); in test_nghttp2_session_recv() 729 scripted_data_feed_init2(&df, &bufs); in test_nghttp2_session_recv() [all …]
|
/third_party/node/deps/nghttp2/lib/ |
D | nghttp2_buf.c | 116 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk, in nghttp2_bufs_init() argument 118 return nghttp2_bufs_init2(bufs, chunk_length, max_chunk, 0, mem); in nghttp2_bufs_init() 121 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init2() argument 123 return nghttp2_bufs_init3(bufs, chunk_length, max_chunk, max_chunk, offset, in nghttp2_bufs_init2() 127 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init3() argument 142 bufs->mem = mem; in nghttp2_bufs_init3() 143 bufs->offset = offset; in nghttp2_bufs_init3() 145 bufs->head = chain; in nghttp2_bufs_init3() 146 bufs->cur = bufs->head; in nghttp2_bufs_init3() 148 nghttp2_buf_shift_right(&bufs->cur->buf, offset); in nghttp2_bufs_init3() [all …]
|
D | nghttp2_buf.h | 161 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk, 168 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length, 190 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length, 197 void nghttp2_bufs_free(nghttp2_bufs *bufs); 215 int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len, 234 int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, const nghttp2_vec *vec, 241 void nghttp2_bufs_wrap_free(nghttp2_bufs *bufs); 257 int nghttp2_bufs_realloc(nghttp2_bufs *bufs, size_t chunk_length); 272 int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len); 287 int nghttp2_bufs_addb(nghttp2_bufs *bufs, uint8_t b); [all …]
|
D | nghttp2_frame.c | 280 static int frame_pack_headers_shared(nghttp2_bufs *bufs, in frame_pack_headers_shared() argument 286 buf = &bufs->head->buf; in frame_pack_headers_shared() 296 if (bufs->head != bufs->cur) { in frame_pack_headers_shared() 303 if (bufs->head != bufs->cur) { in frame_pack_headers_shared() 309 ce = bufs->cur; in frame_pack_headers_shared() 311 for (ci = bufs->head->next; ci != ce; ci = ci->next) { in frame_pack_headers_shared() 336 int nghttp2_frame_pack_headers(nghttp2_bufs *bufs, nghttp2_headers *frame, in nghttp2_frame_pack_headers() argument 342 assert(bufs->head == bufs->cur); in nghttp2_frame_pack_headers() 346 buf = &bufs->cur->buf; in nghttp2_frame_pack_headers() 352 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_headers() [all …]
|
D | nghttp2_hd_huffman.c | 45 int nghttp2_hd_huff_encode(nghttp2_bufs *bufs, const uint8_t *src, in nghttp2_hd_huff_encode() argument 55 avail = nghttp2_bufs_cur_avail(bufs); in nghttp2_hd_huff_encode() 66 memcpy(bufs->cur->buf.last, &x, 4); in nghttp2_hd_huff_encode() 67 bufs->cur->buf.last += 4; in nghttp2_hd_huff_encode() 75 rv = nghttp2_bufs_addb(bufs, (uint8_t)(code >> 56)); in nghttp2_hd_huff_encode() 83 avail = nghttp2_bufs_cur_avail(bufs); in nghttp2_hd_huff_encode() 87 rv = nghttp2_bufs_addb(bufs, (uint8_t)(code >> 56)); in nghttp2_hd_huff_encode() 97 bufs, (uint8_t)((uint8_t)(code >> 56) | ((1 << (8 - nbits)) - 1))); in nghttp2_hd_huff_encode()
|
D | nghttp2_frame.h | 138 int nghttp2_frame_pack_headers(nghttp2_bufs *bufs, nghttp2_headers *frame, 160 int nghttp2_frame_pack_priority(nghttp2_bufs *bufs, nghttp2_priority *frame); 177 int nghttp2_frame_pack_rst_stream(nghttp2_bufs *bufs, 199 int nghttp2_frame_pack_settings(nghttp2_bufs *bufs, nghttp2_settings *frame); 259 int nghttp2_frame_pack_push_promise(nghttp2_bufs *bufs, 286 int nghttp2_frame_pack_ping(nghttp2_bufs *bufs, nghttp2_ping *frame); 309 int nghttp2_frame_pack_goaway(nghttp2_bufs *bufs, nghttp2_goaway *frame); 348 int nghttp2_frame_pack_window_update(nghttp2_bufs *bufs, 366 int nghttp2_frame_pack_altsvc(nghttp2_bufs *bufs, nghttp2_extension *ext); 409 int nghttp2_frame_pack_origin(nghttp2_bufs *bufs, nghttp2_extension *ext); [all …]
|
/third_party/nghttp2/lib/ |
D | nghttp2_buf.c | 116 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk, in nghttp2_bufs_init() argument 118 return nghttp2_bufs_init2(bufs, chunk_length, max_chunk, 0, mem); in nghttp2_bufs_init() 121 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init2() argument 123 return nghttp2_bufs_init3(bufs, chunk_length, max_chunk, max_chunk, offset, in nghttp2_bufs_init2() 127 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length, in nghttp2_bufs_init3() argument 142 bufs->mem = mem; in nghttp2_bufs_init3() 143 bufs->offset = offset; in nghttp2_bufs_init3() 145 bufs->head = chain; in nghttp2_bufs_init3() 146 bufs->cur = bufs->head; in nghttp2_bufs_init3() 148 nghttp2_buf_shift_right(&bufs->cur->buf, offset); in nghttp2_bufs_init3() [all …]
|
D | nghttp2_buf.h | 161 int nghttp2_bufs_init(nghttp2_bufs *bufs, size_t chunk_length, size_t max_chunk, 168 int nghttp2_bufs_init2(nghttp2_bufs *bufs, size_t chunk_length, 190 int nghttp2_bufs_init3(nghttp2_bufs *bufs, size_t chunk_length, 197 void nghttp2_bufs_free(nghttp2_bufs *bufs); 215 int nghttp2_bufs_wrap_init(nghttp2_bufs *bufs, uint8_t *begin, size_t len, 234 int nghttp2_bufs_wrap_init2(nghttp2_bufs *bufs, const nghttp2_vec *vec, 241 void nghttp2_bufs_wrap_free(nghttp2_bufs *bufs); 257 int nghttp2_bufs_realloc(nghttp2_bufs *bufs, size_t chunk_length); 272 int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len); 287 int nghttp2_bufs_addb(nghttp2_bufs *bufs, uint8_t b); [all …]
|
D | nghttp2_frame.c | 280 static int frame_pack_headers_shared(nghttp2_bufs *bufs, in frame_pack_headers_shared() argument 286 buf = &bufs->head->buf; in frame_pack_headers_shared() 296 if (bufs->head != bufs->cur) { in frame_pack_headers_shared() 303 if (bufs->head != bufs->cur) { in frame_pack_headers_shared() 309 ce = bufs->cur; in frame_pack_headers_shared() 311 for (ci = bufs->head->next; ci != ce; ci = ci->next) { in frame_pack_headers_shared() 336 int nghttp2_frame_pack_headers(nghttp2_bufs *bufs, nghttp2_headers *frame, in nghttp2_frame_pack_headers() argument 342 assert(bufs->head == bufs->cur); in nghttp2_frame_pack_headers() 346 buf = &bufs->cur->buf; in nghttp2_frame_pack_headers() 352 rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen); in nghttp2_frame_pack_headers() [all …]
|
D | nghttp2_hd_huffman.c | 45 int nghttp2_hd_huff_encode(nghttp2_bufs *bufs, const uint8_t *src, in nghttp2_hd_huff_encode() argument 55 avail = nghttp2_bufs_cur_avail(bufs); in nghttp2_hd_huff_encode() 66 memcpy(bufs->cur->buf.last, &x, 4); in nghttp2_hd_huff_encode() 67 bufs->cur->buf.last += 4; in nghttp2_hd_huff_encode() 75 rv = nghttp2_bufs_addb(bufs, (uint8_t)(code >> 56)); in nghttp2_hd_huff_encode() 83 avail = nghttp2_bufs_cur_avail(bufs); in nghttp2_hd_huff_encode() 87 rv = nghttp2_bufs_addb(bufs, (uint8_t)(code >> 56)); in nghttp2_hd_huff_encode() 97 bufs, (uint8_t)((uint8_t)(code >> 56) | ((1 << (8 - nbits)) - 1))); in nghttp2_hd_huff_encode()
|
D | nghttp2_frame.h | 138 int nghttp2_frame_pack_headers(nghttp2_bufs *bufs, nghttp2_headers *frame, 160 int nghttp2_frame_pack_priority(nghttp2_bufs *bufs, nghttp2_priority *frame); 177 int nghttp2_frame_pack_rst_stream(nghttp2_bufs *bufs, 199 int nghttp2_frame_pack_settings(nghttp2_bufs *bufs, nghttp2_settings *frame); 259 int nghttp2_frame_pack_push_promise(nghttp2_bufs *bufs, 286 int nghttp2_frame_pack_ping(nghttp2_bufs *bufs, nghttp2_ping *frame); 309 int nghttp2_frame_pack_goaway(nghttp2_bufs *bufs, nghttp2_goaway *frame); 348 int nghttp2_frame_pack_window_update(nghttp2_bufs *bufs, 366 int nghttp2_frame_pack_altsvc(nghttp2_bufs *bufs, nghttp2_extension *ext); 409 int nghttp2_frame_pack_origin(nghttp2_bufs *bufs, nghttp2_extension *ext); [all …]
|
/third_party/alsa-utils/axfer/ |
D | frame-cache.c | 32 char **bufs = cache->buf; in align_frames_in_n() local 43 memmove(bufs[i], bufs[i] + offset, size); in align_frames_in_n() 44 buf_ptrs[i] = bufs[i] + size; in align_frames_in_n() 76 char **bufs = calloc(samples_per_frame, sizeof(*bufs)); in frame_cache_init() local 80 cache->buf = bufs; in frame_cache_init() 82 if (bufs == NULL || buf_ptrs == NULL) in frame_cache_init() 85 bufs[i] = calloc(frames_per_cache, bytes_per_sample); in frame_cache_init() 86 if (bufs[i] == NULL) in frame_cache_init() 88 buf_ptrs[i] = bufs[i]; in frame_cache_init() 103 char **bufs = cache->buf; in frame_cache_destroy() local [all …]
|
D | mapper-multiple.c | 17 char **bufs; member 123 state->bufs = calloc(cntr_count, sizeof(char *)); in multiple_pre_process() 124 if (state->bufs == NULL) in multiple_pre_process() 138 state->bufs[i] = malloc(bytes_per_buffer); in multiple_pre_process() 139 if (state->bufs[i] == NULL) in multiple_pre_process() 141 memset(state->bufs[i], 0, bytes_per_buffer); in multiple_pre_process() 186 src_bufs = state->bufs; in multiple_muxer_process_frames() 217 dst_bufs = state->bufs; in multiple_demuxer_process_frames() 231 if (state->bufs) { in multiple_post_process() 233 if (state->bufs[i]) in multiple_post_process() [all …]
|
/third_party/alsa-utils/axfer/test/ |
D | generator.c | 66 char **bufs; in allocate_vector() local 71 bufs = calloc(samples_per_frame, sizeof(char *)); in allocate_vector() 72 if (bufs == NULL) in allocate_vector() 76 bufs[i] = calloc(frame_count, bytes_per_sample); in allocate_vector() 77 if (bufs[i] == NULL) { in allocate_vector() 79 free(bufs[i]); in allocate_vector() 80 free(bufs); in allocate_vector() 85 return bufs; in allocate_vector() 111 char **bufs = frame_buffer; in fill_vector() local 121 len = read(fd, bufs[i], size); in fill_vector() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/ |
D | 1-1.c | 69 char *bufs; in main() local 92 bufs = malloc(NUM_AIOCBS * BUF_SIZE); in main() 94 if (bufs == NULL) { in main() 100 if (write(fd, bufs, NUM_AIOCBS * BUF_SIZE) != (NUM_AIOCBS * BUF_SIZE)) { in main() 102 free(bufs); in main() 116 aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE]; in main() 143 free(bufs); in main() 156 free(bufs); in main() 169 free(bufs); in main() 184 free(bufs); in main() [all …]
|
/third_party/libuv/src/win/ |
D | stream.c | 114 const uv_buf_t bufs[], in uv_write() argument 127 err = uv__tcp_write(loop, req, (uv_tcp_t*) handle, bufs, nbufs, cb); in uv_write() 131 loop, req, (uv_pipe_t*) handle, bufs, nbufs, NULL, cb); in uv_write() 134 err = uv__tty_write(loop, req, (uv_tty_t*) handle, bufs, nbufs, cb); in uv_write() 146 const uv_buf_t bufs[], in uv_write2() argument 154 return uv_write(req, handle, bufs, nbufs, cb); in uv_write2() 164 loop, req, (uv_pipe_t*) handle, bufs, nbufs, send_handle, cb); in uv_write2() 170 const uv_buf_t bufs[], in uv_try_write() argument 179 return uv__tcp_try_write((uv_tcp_t*) stream, bufs, nbufs); in uv_try_write() 181 return uv__tty_try_write((uv_tty_t*) stream, bufs, nbufs); in uv_try_write() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/ |
D | 18-1.c | 47 char *bufs; in main() local 65 bufs = malloc(NUM_AIOCBS * BUF_SIZE); in main() 67 if (bufs == NULL) { in main() 78 aiocbs[0]->aio_buf = bufs; in main() 91 free(bufs); in main() 102 free(bufs); in main() 108 free(bufs); in main()
|
D | 2-1.c | 63 char *bufs; in main() local 86 bufs = malloc(NUM_AIOCBS * BUF_SIZE); in main() 88 if (bufs == NULL) { in main() 102 aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE]; in main() 137 free(bufs); in main() 146 free(bufs); in main() 156 free(bufs); in main() 178 free(bufs); in main()
|
/third_party/libuv/test/ |
D | benchmark-udp-pummel.c | 51 static uv_buf_t bufs[5]; variable 101 bufs, in send_cb() 102 ARRAY_SIZE(bufs), in send_cb() 182 bufs[0] = uv_buf_init(&EXPECTED[0], 10); in pummel() 183 bufs[1] = uv_buf_init(&EXPECTED[10], 10); in pummel() 184 bufs[2] = uv_buf_init(&EXPECTED[20], 10); in pummel() 185 bufs[3] = uv_buf_init(&EXPECTED[30], 10); in pummel() 186 bufs[4] = uv_buf_init(&EXPECTED[40], 5); in pummel() 196 bufs, in pummel() 197 ARRAY_SIZE(bufs), in pummel()
|
/third_party/boost/boost/asio/detail/ |
D | win_iocp_socket_service_base.hpp | 256 ConstBufferSequence> bufs(buffers); in send() local 259 bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec); in send() 290 ConstBufferSequence> bufs(buffers); in async_send() local 292 start_send_op(impl, bufs.buffers(), bufs.count(), flags, in async_send() 293 (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(), in async_send() 323 MutableBufferSequence> bufs(buffers); in receive() local 326 bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec); in receive() 359 MutableBufferSequence> bufs(buffers); in async_receive() local 361 start_receive_op(impl, bufs.buffers(), bufs.count(), flags, in async_receive() 362 (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(), in async_receive() [all …]
|
/third_party/boost/libs/asio/include/boost/asio/detail/ |
D | win_iocp_socket_service_base.hpp | 256 ConstBufferSequence> bufs(buffers); in send() local 259 bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec); in send() 290 ConstBufferSequence> bufs(buffers); in async_send() local 292 start_send_op(impl, bufs.buffers(), bufs.count(), flags, in async_send() 293 (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(), in async_send() 323 MutableBufferSequence> bufs(buffers); in receive() local 326 bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec); in receive() 359 MutableBufferSequence> bufs(buffers); in async_receive() local 361 start_receive_op(impl, bufs.buffers(), bufs.count(), flags, in async_receive() 362 (impl.state_ & socket_ops::stream_oriented) != 0 && bufs.all_empty(), in async_receive() [all …]
|