xref: /openbsd/regress/sys/kern/mmap-fail/mmap-fail.c (revision 7b36286a)
1 /*	$OpenBSD: mmap-fail.c,v 1.1 2005/07/11 12:50:46 art Exp $	*/
2 /*
3  *	Written by Artur Grabowski <art@openbsd.org> 2005 Public Domain.
4  */
5 
6 #include <sys/types.h>
7 #include <sys/mman.h>
8 
9 int
10 main()
11 {
12 	void *foo;
13 
14 	foo = mmap(0, (size_t)-1, 0, 0, 0, 0);
15 
16 	if (foo == MAP_FAILED)
17 		return (0);
18 
19 	return (1);
20 }
21