lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Apr 30, 2013, at 10:48 PM, William Ahern wrote:

> On Tue, Apr 30, 2013 at 09:56:26PM -0400, Rena wrote:
>> An idea I've had in the past was that if an
>> allocation ever fails, the process could be paused until enough memory is
>> available instead of letting it die; in that case malloc() might block for
>> any amount of time.

Welcome to OS X! Run out of memory then run out of disk space for swap on your startup disk and the system will start pausing apps. (After first telling apps to throw any ballast over the side--Terminal.app discards scrollback for instance.)

Not that it always works out so well. Something terrible seems to happen when Safari's content slave (the usual perpetrator in fact) gets paused before Safari.app.

> I believe that could easily result in a deadlock scenario.

Dead, deadlock, it's all just words. I prefer "dirt nap". That is not dead which can eternal lie etc etc

Just because the process never completes or even makes progress doesn't mean it ever violated the execution model. It's no worse than the Linux out-of-memory task killer--at least, given the OOM killer's historical habit of going after the X server with kill -9. Boy, that freed up a lot of memory! Why is my CRT making that funny noise?

Jay