MLton RAM usage
Stephen Weeks
MLton@sourcelight.com
Thu, 20 Sep 2001 15:40:50 -0700
> > Unfortunately, that doesn't work. For example, on my machine, here is
> > /proc/meminfo.
> >
> > % cat /proc/meminfo
> > total: used: free: shared: buffers: cached:
> > Mem: 525217792 522846208 2371584 0 99725312 276832256
...
> Well, it looks like you've spent all your memory - how would it
> ever come to run like this?
The problem is that I haven't spent all my memory. In fact, all I have running
is X, xemacs, ical, and netscape. I'm no kernel expert, but I'd say the problem
lies in the 375M of buffers + cached which is available to run programs if I
want to. Henry can probably fill in more details on why free is such a bad
underestimate of what's available.
> Oh, and another thought - what if a user is running two
> different apps which are both compiled with MLton? :)
I agree this could be a problem, but recall that the memory limit that we're
talking about is only grabbed by a MLton app if it needs memory. The compiler
is such hog that it often needs it, but many other apps don't.
I don't disagree that what we're doing now could lead to problems. It's just
that I don't know of a better solution than our current over-approximation + the
ability to manually limit memory usage.