The Pedigree Project 0.1
Public Member Functions | Private Attributes | Friends | List of all members
MemoryPressureHandler Class Referenceabstract

#include <MemoryPressureManager.h>

+ Inheritance diagram for MemoryPressureHandler:
+ Collaboration diagram for MemoryPressureHandler:

Public Member Functions

virtual const char * getMemoryPressureDescription ()=0
 
virtual bool compact ()=0
 

Private Attributes

MemoryPressureHandler * m_pPrevious
 
MemoryPressureHandler * m_pNext
 
size_t m_Priority
 
size_t m_RegistrationSequence
 
bool m_bRegistered
 
bool m_bRemoving
 
size_t m_CallbacksInFlight
 
const void * m_pCallbackOwner
 
WaitQueue m_CallbackWaiters
 

Friends

class MemoryPressureManager
 

Detailed Description

MemoryPressureHandler: interface for memory pressure handlers.

Definition at line 37 of file MemoryPressureManager.h.

Constructor & Destructor Documentation

◆ MemoryPressureHandler()

MemoryPressureHandler::MemoryPressureHandler ( )

Definition at line 47 of file MemoryPressureManager.cc.

Member Function Documentation

◆ compact()

virtual bool MemoryPressureHandler::compact ( )
pure virtual

Called by MemoryPressureManager to request this handler to take action to reduce memory pressure.

Returns
true if pages were released, false otherwise.

Implemented in MemoryMapManager, MemoryPressureProcessKiller, MemoryPoolPressureHandler, and SlamRecovery.

Referenced by MemoryPressureManager::compact().

+ Here is the caller graph for this function:

◆ getMemoryPressureDescription()

virtual const char * MemoryPressureHandler::getMemoryPressureDescription ( )
pure virtual

Returns static storage so describing a recovery action cannot itself allocate memory.

Implemented in MemoryMapManager, MemoryPressureProcessKiller, MemoryPoolPressureHandler, and SlamRecovery.

Referenced by MemoryPressureManager::compact().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ MemoryPressureManager

friend class MemoryPressureManager
friend

Definition at line 56 of file MemoryPressureManager.h.

Member Data Documentation

◆ m_bRegistered

bool MemoryPressureHandler::m_bRegistered
private

Definition at line 62 of file MemoryPressureManager.h.

◆ m_bRemoving

bool MemoryPressureHandler::m_bRemoving
private

Definition at line 63 of file MemoryPressureManager.h.

◆ m_CallbacksInFlight

size_t MemoryPressureHandler::m_CallbacksInFlight
private

Callback lifetime state protected by m_CallbackWaiters' guard.

Definition at line 67 of file MemoryPressureManager.h.

Referenced by MemoryPressureManager::compact(), MemoryPressureManager::registerHandler(), and MemoryPressureManager::removeHandler().

◆ m_CallbackWaiters

WaitQueue MemoryPressureHandler::m_CallbackWaiters
private

Definition at line 69 of file MemoryPressureManager.h.

◆ m_pCallbackOwner

const void* MemoryPressureHandler::m_pCallbackOwner
private

Definition at line 68 of file MemoryPressureManager.h.

◆ m_pNext

MemoryPressureHandler* MemoryPressureHandler::m_pNext
private

Definition at line 59 of file MemoryPressureManager.h.

◆ m_pPrevious

MemoryPressureHandler* MemoryPressureHandler::m_pPrevious
private

Definition at line 58 of file MemoryPressureManager.h.

◆ m_Priority

size_t MemoryPressureHandler::m_Priority
private

Definition at line 60 of file MemoryPressureManager.h.

◆ m_RegistrationSequence

size_t MemoryPressureHandler::m_RegistrationSequence
private

Definition at line 61 of file MemoryPressureManager.h.


The documentation for this class was generated from the following files: