Nos bénévoles n'ont pas encore traduit cet article en Français. Aidez-nous à réaliser cette tâche !
nsIMemoryReporter
objects.
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 Note: It covers all heap allocations, but will miss any Operating System level ones not covered by memory reporters.
This reporter is special-cased because it is interesting, and is moderately difficult to compute in JavaScript. -1 means unknown. Read only. |
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.