The HyperNews Linux KHG Discussion Pages

## Yes, it works just fine.

  Forum: The Linux Kernel Hackers' Guide
  Re: Does MMAP work with Redhat 4.2? (Guy)
  Keywords: MMAP memory error
  Date: Tue, 21 Apr 1998 12:12:15 GMT
  From: Michael K. Johnson <johnsonm@redhat.com>

mmap() works fine on a Red Hat 4.2 system, which ships a perfectly standard Linux kernel. A great deal of the source code included in the distribution uses mmap() explicitly, and every dynamically loaded program uses mmap() implicitly in the dynamic loader. I suggest "man mmap" as a start. Notice the reference at the bottom of the page to getpagesize(), and consider the modulus operator (%). That should help you out... :-) You'll also find sample code that uses mmap() at http://www.redhat.com/~johnsonm/lad/src/map-cat.c.html Other sample source you might find useful is at http://www.redhat.com/~johnsonm/lad/src/

Messages

2. It Works! Thanks! by Guy