Lines Matching refs:mmap
6 * Reference program demonstrating tcp mmap() usage,
9 * Note : NIC with header split is needed to use mmap() on TCP :
24 * We might use sendfile() instead, but really this test program is about mmap(), for receivers ;)
26 * $ ./tcp_mmap -s & # Without mmap()
28 * received 32768 MB (0 % mmap'ed) in 14.1157 s, 19.4732 Gbit
30 * received 32768 MB (0 % mmap'ed) in 14.6833 s, 18.7204 Gbit
32 * received 32768 MB (0 % mmap'ed) in 11.143 s, 24.6682 Gbit
34 * received 32768 MB (0 % mmap'ed) in 14.9056 s, 18.4413 Gbit
38 * $ ./tcp_mmap -s -z & # With mmap()
40 * received 32768 MB (99.9939 % mmap'ed) in 6.73792 s, 40.7956 Gbit
42 * received 32768 MB (99.9939 % mmap'ed) in 7.26732 s, 37.8238 Gbit
44 * received 32768 MB (99.9939 % mmap'ed) in 7.61661 s, 36.0893 Gbit
46 * received 32768 MB (99.9939 % mmap'ed) in 7.43764 s, 36.9577 Gbit
86 static int zflg; /* zero copy option. (MSG_ZEROCOPY for sender, mmap() for receiver */
141 buffer = mmap(NULL, sz, PROT_READ | PROT_WRITE,
146 buffer = mmap(NULL, sz, PROT_READ | PROT_WRITE,
193 perror("mmap");
197 raddr = mmap(NULL, chunk_size + map_align, PROT_READ, flags, fd, 0);
199 perror("mmap");
303 printf("received %lg MB (%lg %% mmap'ed) in %lg s, %lg Gbit\n"
549 perror("mmap");