[Interest] memory fragmentation?
john at wavemetrics.com
Tue Aug 21 18:02:13 CEST 2012
On 21-Aug-2012, at 12:52 AM, Thiago Macieira wrote:
> How? Putting up an alert usually requires allocating memory somewhere, be it
> in your application or in the display server.
> If we're already out of memory, the likelihood of another set of allocations
> succeeding is quite low.
If a large allocation just failed, it's actually likely that you still have a large enough block of memory left to put up an alert. That's our experience with a scientific application, at least. We don't usually fail from a billion tiny allocations, we fail on an allocation of hundreds of megabytes.
In the old days on Macintosh (our application has been shipping since 1989) you would pre-allocate a block of memory that could be released under low-memory conditions just in order to show this alert. There's nothing preventing an application from pre-making the Out of Memory alert at start-up if such conditions are likely. Which they actually aren't (see first paragraph).
> Not to mention that, by the time you do run out of
> memory, the chances are that the system has been swapping hard for several
> minutes. The user will have likely pressed the Reset button long ago.
That's always possible. They call tech support about that, too. Even a 32-bit application benefits from running on a 64-bit machine with lots of physical memory. On Windows, you even get an extra GByte in your address space.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest