2009-09-08 09:23:52 about mmap function
xm ye (CHINA)
Message: 79678
hi,
i use an test application that used mmap function, here is snippets:
mem = mmap(0 /* start anywhere */ ,
vlength, PROT_READ, MAP_SHARED, fd,offset);
if (mem == MAP_FAILED) {
perror("Unable to map buffer");
goto fatal;
}
the application can't run ,the mem's value is MAP_FAILED. Dose mmap fucntion work need some condtion??
QuoteReplyEditDelete
2009-09-08 10:20:52 Re: about mmap function
Mike Frysinger (UNITED STATES)
Message: 79682
like the documentation says everywhere, dont use MAP_SHARED
QuoteReplyEditDelete