Subject: Re: port-i386/3920: linux emulation doesn't support mremap()
To: None <current-users@NetBSD.ORG>
From: Matthias Scheler <>
List: current-users
Date: 08/09/1997 23:14:08
In article <>,
	Matthias Scheler <> writes:
> ...
>   if (chunk_is_mmapped(oldp))
>   {
>     newp = mremap_chunk(oldp, nb);
>     if(newp) return chunk2mem(newp);
> #endif
> ...
> As one can see a dummy function returning an error on mremap() will solve
> the problem.

Just some additional information:
The mremap() call is only used if the "libc" is compiled under Linux. If
the mremap() call fails a standard method is used to fulfil the realloc()
call. Under NetBSD-i386's Linux emulation this fallback code is never
used because the process is aborted due to a bad syscalls. With my patch
the mremap() call will fail "cleanly", the standard code will do the job
and the program will work fine.

Matthias Scheler