|
From: Nicholas N. <nj...@ca...> - 2004-06-27 20:15:17
|
Hi,
According to several man pages I can find, mremap has four arguments:
void * mremap(void *old_address, size_t old_size , size_t new_size,
unsigned long flags);
According to Valgrind, it has five:
/* void* mremap(void * old_address, size_t old_size,
size_t new_size, unsigned long flags, void * new_address); */
MAYBE_PRINTF("mremap ( %p, %d, %d, 0x%x, %p )\n",
arg1, arg2, arg3, arg4, arg5);
Ahem.
I suspect that mremap() is totally bogus, but it hasn't been noticed
because it doesn't get used much.
N
|
|
From: Jeremy F. <je...@go...> - 2004-06-28 07:40:36
|
On Sun, 2004-06-27 at 21:15 +0100, Nicholas Nethercote wrote:
> Hi,
>
> According to several man pages I can find, mremap has four arguments:
>
> void * mremap(void *old_address, size_t old_size , size_t new_size,
> unsigned long flags);
>
> According to Valgrind, it has five:
>
> /* void* mremap(void * old_address, size_t old_size,
> size_t new_size, unsigned long flags, void * new_address); */
> MAYBE_PRINTF("mremap ( %p, %d, %d, 0x%x, %p )\n",
> arg1, arg2, arg3, arg4, arg5);
>
> Ahem.
>
> I suspect that mremap() is totally bogus, but it hasn't been noticed
> because it doesn't get used much.
No, I actually spent quite a bit of time on it to make it work. It was
completely broken.
Mremap does has 5 args, but the fifth arg is an extension which glibc
doesn't support yet.
mm/mremap.c:
asmlinkage unsigned long sys_mremap(unsigned long addr,
unsigned long old_len, unsigned long new_len,
unsigned long flags, unsigned long new_addr)
J
|