From owner-freebsd-questions Thu Dec 23 21:19: 4 1999 Delivered-To: freebsd-questions@freebsd.org Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id 3D59A1573E for ; Thu, 23 Dec 1999 21:18:57 -0800 (PST) (envelope-from mi@kot.ne.mediaone.net) Received: from rtfm.newton (rtfm.newton [10.10.0.1]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id AAA31825 for ; Fri, 24 Dec 1999 00:18:53 -0500 (EST) From: Mikhail Teterin X-Relay-IP: 10.10.0.1 Received: (from mi@localhost) by rtfm.newton (8.9.3/8.9.3) id AAA18438 for questions@freebsd.org; Fri, 24 Dec 1999 00:18:53 -0500 (EST) (envelope-from mi@kot.ne.mediaone.net) Message-Id: <199912240518.AAA18438@rtfm.newton> Subject: questions about mmap() To: questions@freebsd.org Date: Fri, 24 Dec 1999 00:18:53 -0500 (EST) X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" #include #include #include main() { char *p; off_t offset; for(offset = 0; (p = mmap(NULL, 512, PROT_READ, 0, STDIN_FILENO, offset)) != MAP_FAILED; offset+=512) { fprintf(stderr, "%\r%p, %d", p, offset); fprintf(stderr, ", %d", *p); munmap(p, 512); } perror("\nmmap"); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message