[Jprogramming] J's limit on space
William Tanksley, Jr
wtanksleyjr at gmail.com
Tue Oct 11 10:26:53 HKT 2011
Henry Rich <HenryHRich at nc.rr.com> wrote:
> Roger just asks the OS for memory when he wants it and says 'out of
> memory' if he can't get what he asks for. If Mac OS freezes when he
> does that, bad on it.
The issue is much more complex than this. MacOS, like most OSes,
overcommits memory -- it lets programs allocate memory even when there
isn't enough for all memory allocations combined (for all running
processes) to fit. The reason most OSes do this is that it almost
always works very well, and when it fails it can be "fixed" by killing
processes (but odds are you're killing fewer than you'd have to kill
if you hadn't allowed the allocation).
With that said, it's quite likely that the OS designers would be happy
to find an easy way to break their memory allocator so that they can
produce more graceful behavior under pressure -- I've seen similar
problems taken seriously by the Linux people.
> Henry Rich
-Wm
More information about the Programming
mailing list