Lines Matching refs:bufs
49 void *bufs[BUFS]; in main() local
59 iovs = (struct iovec *)malloc(sizeof(bufs) / sizeof(bufs[0]) * in main()
65 bufs[MAGIC] = mmap((void *)(0x45678000), PAGE_SIZE, PROT_READ | PROT_WRITE, in main()
67 if (bufs[MAGIC] == MAP_FAILED) { in main()
71 for (size_t i = 0; i < sizeof(bufs) / sizeof(bufs[0]); i++) { in main()
73 bufs[i] = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, in main()
75 if (bufs[i] == MAP_FAILED) { in main()
79 iovs[i].iov_base = bufs[i]; in main()
84 iovs[MAGIC].iov_base = bufs[MAGIC]; in main()
90 write(fd[1], bufs[0], PAGE_SIZE); in main()
100 for (size_t i = 0; i < sizeof(bufs) / sizeof(bufs[0]); i++) { in main()
101 if (bufs[i]) munmap(bufs[i], PAGE_SIZE); in main()