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)
42 #define MMAP_FLAGS MAP_PRIVATE
45 a = mmap (NULL, size, PROT_READ, MMAP_FLAGS, fd, 0);
47 if (memmem (a, size, str, strlen (str) + 1) == NULL)