I found this on the Ubuntu manpage for "mlock":
...
Linux Notes
Under Linux, mlock() and munlock() automatically round addr down to the
nearest page boundary. However, POSIX.1-2001 allows an implementation
to require that addr is page aligned, so portable applications should
ensure this.
...
So, while it appears that it is probably safe to NOT worry about alignment on
Linux, it doesn't hurt to ensure it.
The code I submitted ensures the alignment for Solaris, but will fail on Linux
because some of the macros are not defined. I can fix it, though. Once you
know PAGESIZE, it is easy to compute PAGEOFFSET and PAGEMASK. I will work up
a new patch and submit one that will compile under Linux as well.
-Wyllys
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech