error messages
This commit is contained in:
parent
41be12989a
commit
8173bc6b20
1 changed files with 13 additions and 3 deletions
16
code/leak.c
16
code/leak.c
|
@ -48,9 +48,19 @@ main(void)
|
|||
printf("main: spray to reduce TLB noise part 1: %u objects\n",
|
||||
PIPE_BUFFER);
|
||||
for (size_t i = 0; i < SPRAY; i++) {
|
||||
pipe2(pipes[i], O_NONBLOCK);
|
||||
fcntl(pipes[i][0], F_SETPIPE_SZ, 2 << 12);
|
||||
write(pipes[i][1], buffer, 8);
|
||||
int ret;
|
||||
ret = pipe2(pipes[i], O_NONBLOCK);
|
||||
if (ret < 0) {
|
||||
printf("main: error: pipe2: object %lu\n", i);
|
||||
}
|
||||
ret = fcntl(pipes[i][0], F_SETPIPE_SZ, 2 << 12);
|
||||
if (ret < 0) {
|
||||
printf("main: error: fcntl: object %lu\n", i);
|
||||
}
|
||||
ret = write(pipes[i][1], buffer, 8);
|
||||
if (ret < 0) {
|
||||
printf("main: error: write: object %lu\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
// May need socket and two parts instead
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue