Re: Chat with Wesley Terpstra

"Wesley W. Terpstra" <[email protected]>
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <[email protected]>
On Thu, Apr 29, 2010 at 6:22 PM, Wesley W. Terpstra <[email protected]>wrote:

>  One thing that you could check is the behavior of this memory leak program
>> on x86-mingw (on a machine with >4GiB memory):
>>
>>  fun loop (l,w) =
>>     if (w = 0wx0)
>>        then let
>>                val w = List.foldl Word.xorb 0wx0 l
>>                val _ = print (concat ["w = ", Word.toString w, "\n"])
>>             in
>>                loop (l, if w = 0wx0 then 0wxAAAAAAAA else w)
>>             end
>>     else loop (w::l, w - 0wx1)
>>  val _ = loop ([], 0wxAAAAAAAA)
>>
>
All of these results come from mingw r7454 as uploaded to the Experimental
page.

I tried it on my machine with =4GB of memory running 64-bit Windows 7, but
running it as a 32-bit application. With 'may-page-heap' off, it took 20
seconds. With 'may-page-heap' on, it took 56 seconds. I've attached the
output of both runs. It doesn't manage to get any more memory with the
'may-page-heap', because my windows mremap implementation can get just as
much memory as paging to disk (it expands in place). I imagine you'd see the
same behaviour in linux with native mremap?

I also tried it on the same machine (4GB, Windows 7, 64-bit) as a 64-bit
application. With 'may-page-heap' off, it took 10 minutes before I
terminated it. With 'may-page-heap' on, it ran for over 22 minutes before I
terminated it. Unfortunately, the stderr file gets truncated when I
interrupt it.

I noticed that the no-paging varient took more than 3.6GB of physical memory
in windows task manager (enough that my system thrashed). I didn't have task
manager open for the yes-paging test. Perhaps it is overestimating the
amount of physical memory and thus not stopping at 50% as it should? Or is
it the usual last-step resize = up to 2* maximum memory? Whatever is
happening, it's not ok to push a system to thrashing with default
parameters.

I can also try the 32-bit version under XP (32-bit) if that would useful. I
expect it will behave just like it did in Windows 7 (32-bit), however. In
other words, work perfectly.

It won't be easy for me to get +GB on a mingw test machine. Well, it would
be if I went and bought more RAM, but prices are bad right now. All the
machines I have access to with more memory are running linux and I can't
just switch them as they are servers.

_______________________________________________
MLton mailing list
[email protected]
http://mlton.org/mailman/listinfo/mlton
memleak.32.nopage.stderr (application/octet-stream, 95 KB) - not displayed
memleak.32.yespage.stderr (application/octet-stream, 109.6 KB) - not displayed
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.