Re: max-heap setting for 64-bit applications

Florian Weimer <[email protected]>
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <[email protected]>
* Matthew Fluet:

> 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.

Linux exposes the distinction as well if you set vm.overcommit_memory
to 2.  There's just no ABI guarantee how to reserve part of the
address space without having it to count towards the commit limit.
The PROT_NONE business seems to work, but most run-time libraries
allocating a single heap block get this wrong.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.