On Fri, Dec 18, 2009 at 3:13 PM, Ben Taylor <bentaylor.solx86 at gmail.com>
wrote:
> I see from build 127,
>
> rw/config/stdcxx_amd64.h:#define _RWSTD_NO_MADVISE
> rw/config/stdcxx_i386.h:#define _RWSTD_NO_MADVISE
>
> I'm guessing that the madvise defined in /usr/include/sys/mman.h
> doesn't follow the correct prototype, ?since there is a new
> posix_madvise function defined.
>
> Are there any thoughts on whether there's an advantage to making
> stdcxx4 use the posix_madvise call?
Answering my own question, I would surmise the answer is probably: none.
I find this interesting comment in:
stdcxx-4.2.1/src/memattr.cpp
# ifdef _RWSTD_OS_SUNOS
char dummy = '\0';
// on Solaris use mincore() instead of madvise() since
// the latter is unreliable
if (-1 == mincore (next, 1, &dummy))
const int err = errno;
errno = errno_save;
if (ENOMEM == err)
return next == page ? -1 : DIST (next, addr);
}
Any comments on the preference of mincore over madvise?
Least I don't have to wedge a posix_madvise into S10's libc now...