15 int main (int argc
, char *argv
[])
17 int fd
= open (argv
[0], O_RDONLY
);
21 const char *str
= "a string you'll only find in the program";
29 if (fstat (fd
, &sb
) < 0)
37 /* We want to test mmapping a size that isn't exactly a page. */
38 if ((size
& 8191) == 0)
41 a
= mmap (NULL
, size
, PROT_READ
, MAP_SHARED
, fd
, 0);
43 if (memmem (a
, size
, str
, strlen (str
) + 1) == NULL
)
This page took 0.032847 seconds and 4 git commands to generate.