Speaking of, I see a lot of int64_max sprinkled throughout, which doesn't seem right for 32 bit platforms.
Hi Ted, In tmpfs3.diff there are three uses of INT64_MAX: The first, in tmpfs_mount(), concerns the maximum amount of memory (in bytes) that tmpfs will contemplate. This value is bounded by the numbers in UVM's uvmexp and by the parameters specified upon mount, if any. The second and the third bound the number of pages available to tmpfs, which is kept internally as a uint64_t (certainly overkill, could perfectly be uint32_t, but is unlikely to cause problems and helps when translating from pages to bytes). This bounding happens when filling struct statfs's f_bavail and f_favail, which are int64_t. -p.