oaMemoryError
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaMemoryError 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaMemoryError 当前在 oapy 中可用的 Python 接口。
详细说明
The oaMemoryError class represents an exception that OpenAccess throws when oaMemory::get() or oaMemory::resize() is called for a process and it detects that the process is out of memory。 The class includes functions that can be used to access system and process memory information related to the out-of-memory exception。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getAllocSize() |
| ✅ | obj.getSbrk() |
| ✅ | obj.getOAVMSize() |
| ✅ | obj.getAvailableMem() |
| ✅ | obj.getPhysicalMem() |
| ✅ | obj.getLimitMem() |
| ✅ | obj.isUnlimited() |
方法说明
obj.getAllocSize()
绑定状态: 已绑定
Python 调用: obj.getAllocSize()
This function returns the size of memory that OpenAccess tried to allocate。
Python 示例
from oapy._oa import _base
# assume obj is a oaMemoryError
obj.getAllocSize()
obj.getSbrk()
绑定状态: 已绑定
Python 调用: obj.getSbrk()
This function returns the size of virtual memory on the heap。
Python 示例
from oapy._oa import _base
# assume obj is a oaMemoryError
obj.getSbrk()
obj.getOAVMSize()
绑定状态: 已绑定
Python 调用: obj.getOAVMSize()
This function returns the total number of bytes OpenAccess is currently using in virtual memory including all allocations it has made。
Python 示例
from oapy._oa import _base
# assume obj is a oaMemoryError
obj.getOAVMSize()
obj.getAvailableMem()
绑定状态: 已绑定
Python 调用: obj.getAvailableMem()
This function returns the size of available system memory。
Python 示例
from oapy._oa import _base
# assume obj is a oaMemoryError
obj.getAvailableMem()
obj.getPhysicalMem()
绑定状态: 已绑定
Python 调用: obj.getPhysicalMem()
This function returns the size of system physical memory。
Python 示例
from oapy._oa import _base
# assume obj is a oaMemoryError
obj.getPhysicalMem()
obj.getLimitMem()
绑定状态: 已绑定
Python 调用: obj.getLimitMem()
This function returns the size of the memory limit, if set。
Python 示例
from oapy._oa import _base
# assume obj is a oaMemoryError
obj.getLimitMem()
obj.isUnlimited()
绑定状态: 已绑定
Python 调用: obj.isUnlimited()
This function returns true if the memory limit is set; otherwise it returns false。
Python 示例
from oapy._oa import _base
# assume obj is a oaMemoryError
obj.isUnlimited()