Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

nsIMemory Interface Reference

import "nsIMemory.idl";

Inheritance diagram for nsIMemory:

nsISupports nsIRecyclingAllocator

List of all members.


Detailed Description

nsIMemory: interface to allocate and deallocate memory. Also provides for notifications in low-memory situations.

A client that wishes to be notified of low memory situations (for example, because the client maintains a large memory cache that could be released when memory is tight) should register with the observer service (see nsIObserverService) using the topic "memory-pressure". There are three specific types of notications that can occur. These types will be passed as the |aData| parameter of the of the "memory-pressure" notification:

"low-memory" This will be passed as the extra data when the pressure observer is being asked to flush for low-memory conditions.

"heap-minimize" This will be passed as the extra data when the pressure observer is being asked to flush because of a heap minimize call.

"alloc-failure" This will be passed as the extra data when the pressure observer has been asked to flush because a malloc() or realloc() has failed.

FROZEN

Definition at line 71 of file nsIMemory.idl.


Public Member Functions

voidPtr alloc (in size_t size)
void free (in voidPtr ptr)
void heapMinimize (in boolean immediate)
boolean isLowMemory ()
voidPtr realloc (in voidPtr ptr, in size_t newSize)
Methods
 NS_IMETHOD_ (nsrefcnt) Release(void)=0
 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)=0

The documentation for this interface was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index