Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsIMemoryReporterManager

Nos bénévoles n'ont pas encore traduit cet article en Français. Aidez-nous à réaliser cette tâche !

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 mmap, VirtualAlloc) and at the heap level (for example, via malloc(), calloc(), operator new).

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

Requires Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)

enumerateMultiReporters()

Returns an enumerator for looking at the installed memory multi-reporters.

nsISimpleEnumerator enumerateMultiReporters();
Parameters

None.

Return value

An enumerator of nsIMemoryMultiReporters 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.

Requires Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)

init()

Initializes the memory reporter manager.

void init();
Parameters

None.

Requires Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)

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.

Requires Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)

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

Étiquettes et contributeurs liés au document

 Contributeurs à cette page : Sheppy, trevorh
 Dernière mise à jour par : Sheppy,