[MLton] max-heap setting for 64-bit applications

Matthew Fluet matthew.fluet at gmail.com
Mon Dec 14 09:57:51 PST 2009


On Mon, Dec 14, 2009 at 12:51 PM, Florian Weimer <fw at deneb.enyo.de> wrote:
> * Matthew Fluet:
>
>> (Or, on Windows, use the reserve/commit distinction.
>
> It's there on Linx, too.
>
>> On Posix, use the madvise to preemptively indicate page-out/page-in
>> behavior.
>
> Doesn't work.  You have to map with PROT_NONE and then use mprotect to
> make available the parts you need.
>
> This is not a published kernel ABI, so it might break in the future.

Oh, I certainly understand that under-the-hood any VMM is likely to
have the reserve/commit distinction; plus plenty more subtleties:
sharing of zero-pages, copy-on-write for fork-exec, etc., etc.  But,
if it isn't exposed in a user-space ABI, then it isn't "there" for us.
 Windows, on the other hand, *requires* the user to manage the
distinction via the published user-space ABI.



More information about the MLton mailing list