Mail Archives: cygwin/2000/11/21/20:22:46
> Could you [since Kelley is out of town till Sunday, this "you" is
> anyone with a convenient cygwin installation] please compile and run
> the appended test program under cygwin? It should either exit
> successfully, or crash; I need to know which.
It runs OK.
> #include <sys/types.h>
> #include <sys/mman.h>
> #include <unistd.h>
> #include <string.h>
>
> #define PAGEPROT PROT_READ|PROT_WRITE
> #define MAPFLAGS MAP_PRIVATE|MAP_ANONYMOUS
>
> int main(void)
> {
> size_t pagesize = getpagesize();
> char *base;
>
> base = mmap(0, 16*pagesize, PAGEPROT, MAPFLAGS, -1, 0);
> memset(base, 0xAB, 16*pagesize);
>
> munmap(base + 4*pagesize, pagesize);
>
> memset(base, 0xCD, 4*pagesize);
> memset(base + 5*pagesize, 0xCD, 10*pagesize);
>
> return 0;
> }
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -