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

From: Arun Sharma <>
Date: 2004-03-10 07:26:38
Peter Chubb wrote:
> 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

As David said, this has been discussed before. Basically if there were 
other 4k mappings with a different permission in the same 16k chunk, you 
can't deallocate the 16k chunk safely. Tracking the sub pages without 
changes to machine independent code (struct page) is possible, but may 
be expensive.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Mar 9 15:34:04 2004

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