From: Matthew F. <mat...@gm...> - 2009-12-14 08:45:02
|
On Fri, Dec 11, 2009 at 10:56 PM, Henry Cejtin <hen...@sb...> wrote: > With regards to the max-heap argument, it would be really good to have > an argument which is the maximum amount of memory MLton can use, or as > close as we can come to that. If it tries to grow bigger, even if only > temporarily to grow a heap, and can't grow it by any other allowed > means, it should fail with out of memory. I think the only way one could use such an argument would be to malloc/mmap that whole space at the beginning of the program and never release or resize it. We could still make use of a smaller heap within that reserved space, and let the OS VMM page out the unused pages. (Or, on Windows, use the reserve/commit distinction. On Posix, use the madvise to preemptively indicate page-out/page-in behavior. I think I recall seeing that some *BSDs allow you to get the reserve/commit distinction that Windows provides.) |