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

Function create_nonaligned_buffers

test/read-write.c:30–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28static int warned;
29
30static int create_nonaligned_buffers(void)
31{
32 int i;
33
34 vecs = t_malloc(BUFFERS * sizeof(struct iovec));
35 for (i = 0; i < BUFFERS; i++) {
36 char *p = t_malloc(3 * BS);
37
38 if (!p)
39 return 1;
40 vecs[i].iov_base = p + (rand() % BS);
41 vecs[i].iov_len = 1 + (rand() % BS);
42 }
43
44 return 0;
45}
46
47static int _test_io(const char *file, struct io_uring *ring, int write,
48 int buffered, int sqthread, int fixed, int nonvec,

Callers 1

mainFunction · 0.85

Calls 1

t_mallocFunction · 0.85

Tested by

no test coverage detected