nsIMemoryReporterManager 编辑
xpcom/base/nsIMemoryReporter.idl
Scriptable A service that provides methods for managing nsIMemoryReporter
objects. Inherits from: nsISupports
Last changed in Gecko 1.9 (Firefox 3)Implemented by @mozilla.org/memory-reporter-manager;1
as a service:
var reporterManager = Components.classes["@mozilla.org/memory-reporter-manager;1"] .getService(Components.interfaces.nsIMemoryReporterManager);
Each memory reporter object, which implements nsiMemoryReporter
interface, provides information for a given code area. Each code area is identified by a unique path string, which is displayed in about:memory
.
Method overview
nsISimpleEnumerator enumerateMultiReporters(); |
nsISimpleEnumerator enumerateReporters(); |
void init(); |
void registerMultiReporter(in nsIMemoryMultiReporter reporter); |
void registerReporter(in nsIMemoryReporter reporter); |
void unregisterMultiReporter(in nsIMemoryMultiReporter reporter); |
void unregisterReporter(in nsIMemoryReporter reporter); |
Attributes
Attribute | Type | Description |
explicit | PRInt64 | Gets the total size of explicit memory allocations, both at the operating system level (for example, via |
resident | PRInt64 | Gets the resident size (that is RSS, physical memory used). This reporter is special-cased because it is interesting, is available on all platforms, and returns a meaningful result on all common platforms. -1 means unknown. Read only. |
Methods
enumerateMultiReporters()
Returns an enumerator for looking at the installed memory multi-reporters.
nsISimpleEnumerator enumerateMultiReporters();
Parameters
None.
Return value
An enumerator of nsIMemoryMultiReporter
s that are currently registered.
enumerateReporters()
Returns an enumerator for looking at the installed memory reporters.
nsISimpleEnumerator enumerateReporters();
Parameters
None.
Return value
An nsISimpleEnumerator
for enumerating installed memory reporters.
init()
Initializes the memory reporter manager.
void init();
Parameters
None.
registerMultiReporter()
Requests that memory multi-reporter notifications be sent to the specified objects.
void registerMultiReporter( in nsIMemoryMultiReporter reporter );
Parameters
reporter
- An object implementing the
nsIMemoryMultiReporter
interface which provides memory usage information for a given code area.
registerReporter()
Requests that memory reporter notifications be sent to the specified objects.
void registerReporter( in nsIMemoryReporter reporter );
Parameters
reporter
- An object implementing the
nsIMemoryReporter
interface which provides memory usage information for a given code area.
unregisterMultiReporter()
Stops sending memory multi-reporter notifications to the specified object.
void unregisterMultiReporter( in nsIMemoryMultiReporter reporter );
Parameters
reporter
- An object implementing the
nsIMemoryMultiReporter
interface which provides memory usage information for a given code area.
unregisterReporter()
Stops sending memory reporter notifications to the specified object.
void unregisterReporter( in nsIMemoryReporter reporter );
Parameters
reporter
- An object implementing the
nsIMemoryReporter
interface which provides memory usage information for a given code area.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论