drain before loading

This commit is contained in:
twoneis 2025-04-10 20:38:39 +02:00
parent 731e8a3958
commit 0d4b45391a

View file

@ -23,6 +23,12 @@ main(void)
printf("main: start\n");
FILE *device = fopen(LKM_DEVICE, "r+");
printf("main: draining lower page free lists: %u objects\n",
PIPE_BUFFER);
for (size_t i = 0; i < PIPE_BUFFER; i++) {
allocation_primitive(pipes[i]);
}
printf("main: fopen: %p\n", device);
if (!device) {
printf(
@ -31,12 +37,6 @@ main(void)
exit(1);
}
printf("main: draining lower page free lists: %u objects\n",
PIPE_BUFFER);
for (size_t i = 0; i < PIPE_BUFFER; i++) {
allocation_primitive(pipes[i]);
}
fclose(device);
printf("main: done\n");
}