3

This isn't a problem or anything, merely something I'm curious about - and I've only tested it on Windows 7.

When I shut down my computer (or something else sends a shut down request) and until the workstation actually shuts down, various programs often report out of memory errors. My browser (Opera), for instance, shows such an error when I open a new tab during that (brief) time. Programs running on .NET also throw OutOfMemoryExceptions when asked to do something "heavy" during that time.

I find it a little interesting. Why this error? Is it actually another error, merely being misreported? Does the OS stop responding to further memory requests when it's shutting down? Does it maybe even shrink the logical address range allocated to that process, before claiming it all back?

5
  • OutOfMemoryException mean you have an application with a memory leak and/or code that results in an infinite loop.
    – Ramhound
    Sep 25, 2014 at 18:10
  • 4
    @Ramhound Not the case here. I'm referring to perfectly well-working programs, behaving this way specifically and exclusively in the brief time between the invocation of a Windows shutdown and the actual shutdown of the workstation.
    – T. C.
    Sep 25, 2014 at 18:12
  • 1
    never seen it before but a wild guess is maybe your pagefile / virtual memory is somehow shut down prior to applications. just a wild guess. I know when i've had an out of memory issue.. it has been when my hard drive was running low, and the message windows gave was that virtual memory was low. So, if you get it on shutdown that makes me think maybe your virtual memory goes down prematurely for some reason.
    – barlop
    Sep 25, 2014 at 18:26
  • @Ramhound well, if you were to rule out 'well behaving applications' as a cause, then I suppose that would that leave you with badly behaving applications -or- an OS glitch.
    – barlop
    Sep 25, 2014 at 18:57
  • @Ramhound likewise
    – barlop
    Sep 25, 2014 at 21:27

1 Answer 1

0

When the system is in shutdown mode, it can refuse to grant additional memory allocation requests to programs. Typically, programs will log/report this as out of memory, but really the reason is that the OS is shutting down and is cleaning up allocated resources NOT giving more out.

Like you observed, it's not a "real" problem, just a timing artifact... Opera trying to grab some additional memory at the same time the system is shutting down. Presumably this happens because Opera hasn't either received or processed the system shutdown message before it has made its resource request.

8
  • that makes sense, but then as to addressing it- a question is- why is the timing off on his system.. or at least, how can he rectify it.
    – barlop
    Sep 25, 2014 at 18:59
  • The timing isn't "off" on his system and there isn't a problem to fix or rectify.
    – webmarc
    Sep 25, 2014 at 19:02
  • I think you've misunderstood the phrase "The timing is off", it's an expression You used the term "an artifact of funky timing". What you call "funky timing" means the same as "the timing is off". And if he gets a message about out of memory, it's not ideal is it.. it'd be better if he didn't have "funky timing" and didn't get that message.
    – barlop
    Sep 25, 2014 at 19:04
  • No, I think you misunderstood funky to mean "bad" so I've edited my answer to remove it. There's just nothing broken here, and so nothing to fix.
    – webmarc
    Sep 25, 2014 at 19:08
  • 2
    I've seen this on many otherwise healthy workstations in many different environments. It's clearly not a random event plaguing the OPs machine in particular. Sep 26, 2014 at 1:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .