Is “Out Of Memory” A Recoverable Error?

后端 未结 24 2055
闹比i
闹比i 2020-11-30 21:44

I\'ve been programming a long time, and the programs I see, when they run out of memory, attempt to clean up and exit, i.e. fail gracefully. I can\'t remember the last time

24条回答
  •  隐瞒了意图╮
    2020-11-30 22:21

    If you are really out of memory you are doomed, since you can not free anything anymore.

    If you are out of memory, but something like a garbage collector can kick in and free up some memory you are non dead yet.

    The other problem is fragmentation. Although you might not be out of memory (fragmented), you might still not be able to allocate the huge chunk you wanna have.

提交回复
热议问题