I was wondering, why should the size of mapped memory being one parameter passed in, since there couldn't more more than one mapping starting from same address (could they ?), why won't linux kernel record both start address, length together, but let userspace program remember them.
I mean, why wouldn't it be, just use the start address as primary key to store the information tree.
One can map
, say, 5 pages and later unmap
one of them. And information about what pages to unmap is passed as address and length where the length is a multiple of page size.