Re: Virtual memory leaking through IA32 emulation layer for mmap and munmap

From: Peter Chubb <peter_at_chubb.wattle.id.au>
Date: 2004-03-09 11:57:47
>>>>> "David" == David Mosberger <davidm@napali.hpl.hp.com> writes:


David> Rounded up to the _page-size_ which is 4KB for x86.  In
David> general, you can't just round up to 16KB for munmap() or all
David> hell will break lose.

As munmap()'s behaviour is undefined on memory that wasn't allocated
with mmap(), rounding to the underlaying true page size should work
for well-behaved programs.

     x = mmap(... 4k ....)
maps a 16k chunk

     munmap(x, 4k)
deallocates a 16k chunk, if page_size is 16k

Of course at present, mmap32 tries to be clever and pretend PAGE_SIZE
is 4k, so it doesn't work...

--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
The technical we do immediately,  the political takes *forever*
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Mar 8 20:04:14 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:24 EST