错误代码门户
PythonPython错误代码

MemoryError

MemoryError

代码 MemoryError · Python 报告的问题。

当操作耗尽内存但情况仍然可以挽救(通过删除一些对象)时引发。关联值是一个字符串,指示哪种(内部)操作耗尽了内存。请注意,由于底层内存管理架构(C 的 malloc() 函数)的原因,解释器可能并不总是能够从这种情况中完全恢复;尽管如此,它还是会引发异常,以便在程序失控的情况下打印堆栈回溯。

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

Raised when an operation runs out of memory but the situation may still be rescued (by deleting some objects). The associated value is a string indicating what kind of (internal) operation ran out of memory. Note that because of the underlying memory management architecture (C’s malloc() function), the interpreter may not always be able to completely recover from this situation; it nevertheless raises an exception so that a stack traceback can be printed, in case a run-away program was the cause.

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。