BSD has a MAP_ANON flag, which is the same. This is an interesting
idea! Thank you!
- Brian
On Mon, May 01, 2017 at 07:52:25PM +0200, Rob Janssen wrote:
BTW, a nice trick for such tables is to do a mmap of
/dev/zero with the proper size as a
starting point, then write only the entries that are nonzero.
That way the vast spaces that are only zeroes will not occupy physical memory, and when
they are read by the forwarding code they read back as zeroes.
Linux also has a "|MAP_ANONYMOUS" flag to obtain the same result, I don't
know if BSD has that. |Rob