Subject: Re: new mremap(2): relax alignment restrictions?
To: None <tech-kern@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: tech-kern
Date: 07/30/2007 19:08:07
erh@nimenees.com (Eric Haszlakiewicz) writes:

>jodi: ktrace ls > /dev/null
>jodi: kdump | grep "CALL.*mmap" | wc -l
>      11

>On a recursive ls through /usr, I saw that 11 go up to 19.

% ktrace ls >/dev/null
% kdump | grep "CALL.*mmap"
 18007      1 ls       CALL  mmap(0,0x8000,3,0x1002,0xffffffff,0,0,0)
 18007      1 ls       CALL  mmap(0,0x37,1,1,3,0,0,0)
 18007      1 ls       CALL  mmap(0,0x1000,1,1,3,0,0,0)
 18007      1 ls       CALL  mmap(0,0xe0000,5,2,3,0,0,0)
 18007      1 ls       CALL  mmap(0xbbbd3000,0x7000,3,0x12,3,0,0xc9000,0)
 18007      1 ls       CALL  mmap(0xbbbda000,0x10000,3,0x1012,0xffffffff,0,0,0)
 18007      1 ls       CALL  mmap(0,0x1000,3,0x1002,0xffffffff,0,0,0)


Only the second mmap needs to be treated, the others are a multiple
size of a page.

-- 
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."