MCPcopy Create free account
hub / github.com/axboe/liburing / t_create_buffers

Function t_create_buffers

test/helpers.c:110–121  ·  view source on GitHub ↗

* Helper for creating @buf_num number of iovec * with @buf_size bytes buffer of each iovec. */

Source from the content-addressed store, hash-verified

108 * with @buf_size bytes buffer of each iovec.
109 */
110struct iovec *t_create_buffers(size_t buf_num, size_t buf_size)
111{
112 struct iovec *vecs;
113 int i;
114
115 vecs = t_malloc(buf_num * sizeof(struct iovec));
116 for (i = 0; i < buf_num; i++) {
117 t_posix_memalign(&vecs[i].iov_base, buf_size, buf_size);
118 vecs[i].iov_len = buf_size;
119 }
120 return vecs;
121}
122
123/*
124 * Helper for setting up an io_uring instance, skipping if the given user isn't

Callers 12

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
do_iopollFunction · 0.85
test_ioFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

t_mallocFunction · 0.85
t_posix_memalignFunction · 0.85

Tested by 1

test_ioFunction · 0.68