#include #include #include #include #include #include // where does this come from? #define OBJS_PER_SLAB 42 #define PIPE_BUFFER (OBJS_PER_SLAB * 10) int pipes[PIPE_BUFFER][2]; void alloc_pipes(int[2], int); int main(void) { printf("main: start\n"); FILE *device = fopen("/dev/lkm", "r+"); printf("main: fopen: %p\n", device); for (size_t i = 0; i < PIPE_BUFFER; i++) { alloc_pipes(pipes[i], O_NONBLOCK); } fclose(device); printf("main: done\n"); } void alloc_pipes(int fd[2], int flags) { pipe2(pipes, flags); }