hi, I came across the following problem. The madvise() system call returns -EBADF for areas which does not map to files, only for *behaviour* request MADV_WILLNEED. Is this the intended behaviour of madvise() ? According to man pages, madvise returns : EBADF - the map exists, but the area maps something that isn?t a file. I have attached a patch which could resolve the issue. [ There is already a bug reported in OSDL regarding this issue: Bug # 2995 ]. -- regards, Suzuki K P Linux Technology Centre IBM Software Labs