ReactOS  0.4.14-dev-115-g4576127
CMallocSpy Struct Reference
Inheritance diagram for CMallocSpy:
Collaboration diagram for CMallocSpy:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID riid, void **ppvObject)
 
virtual ULONG STDMETHODCALLTYPE AddRef ()
 
virtual ULONG STDMETHODCALLTYPE Release ()
 
virtual SIZE_T STDMETHODCALLTYPE PreAlloc (SIZE_T cbRequest)
 
virtual LPVOID STDMETHODCALLTYPE PostAlloc (LPVOID pActual)
 
virtual LPVOID STDMETHODCALLTYPE PreFree (LPVOID pRequest, BOOL)
 
virtual void STDMETHODCALLTYPE PostFree (BOOL fSpyed)
 
virtual SIZE_T STDMETHODCALLTYPE PreRealloc (LPVOID pRequest, SIZE_T cbRequest, LPVOID *ppNewRequest, BOOL)
 
virtual LPVOID STDMETHODCALLTYPE PostRealloc (LPVOID pActual, BOOL fSpyed)
 
virtual LPVOID STDMETHODCALLTYPE PreGetSize (LPVOID pRequest, BOOL)
 
virtual SIZE_T STDMETHODCALLTYPE PostGetSize (SIZE_T cbActual, BOOL)
 
virtual LPVOID STDMETHODCALLTYPE PreDidAlloc (LPVOID pRequest, BOOL)
 
virtual int STDMETHODCALLTYPE PostDidAlloc (LPVOID, BOOL, int fActual)
 
virtual void STDMETHODCALLTYPE PreHeapMinimize ()
 
virtual void STDMETHODCALLTYPE PostHeapMinimize ()
 

Additional Inherited Members

- Public Types inherited from IMallocSpy
typedef IMallocSpyLPMALLOCSPY
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 22 of file CComHeapPtr.cpp.

Member Function Documentation

◆ AddRef()

virtual ULONG STDMETHODCALLTYPE CMallocSpy::AddRef ( void  )
inlinevirtual

Implements IUnknown.

Definition at line 33 of file CComHeapPtr.cpp.

33 { return 1; }

◆ PostAlloc()

virtual LPVOID STDMETHODCALLTYPE CMallocSpy::PostAlloc ( LPVOID  pActual)
inlinevirtual

Implements IMallocSpy.

Definition at line 36 of file CComHeapPtr.cpp.

37  {
39  return pActual;
40  }
static LONG g_OpenAllocations
Definition: CComHeapPtr.cpp:19
#define InterlockedIncrement
Definition: armddk.h:53

◆ PostDidAlloc()

virtual int STDMETHODCALLTYPE CMallocSpy::PostDidAlloc ( LPVOID  ,
BOOL  ,
int  fActual 
)
inlinevirtual

Implements IMallocSpy.

Definition at line 61 of file CComHeapPtr.cpp.

61 { return fActual; }

◆ PostFree()

virtual void STDMETHODCALLTYPE CMallocSpy::PostFree ( BOOL  fSpyed)
inlinevirtual

Implements IMallocSpy.

Definition at line 42 of file CComHeapPtr.cpp.

43  {
44  if (fSpyed)
46  }
static LONG g_OpenAllocations
Definition: CComHeapPtr.cpp:19
#define InterlockedDecrement
Definition: armddk.h:52

◆ PostGetSize()

virtual SIZE_T STDMETHODCALLTYPE CMallocSpy::PostGetSize ( SIZE_T  cbActual,
BOOL   
)
inlinevirtual

Implements IMallocSpy.

Definition at line 59 of file CComHeapPtr.cpp.

59 { return cbActual; }

◆ PostHeapMinimize()

virtual void STDMETHODCALLTYPE CMallocSpy::PostHeapMinimize ( )
inlinevirtual

Implements IMallocSpy.

Definition at line 63 of file CComHeapPtr.cpp.

63 {}

◆ PostRealloc()

virtual LPVOID STDMETHODCALLTYPE CMallocSpy::PostRealloc ( LPVOID  pActual,
BOOL  fSpyed 
)
inlinevirtual

Implements IMallocSpy.

Definition at line 52 of file CComHeapPtr.cpp.

53  {
54  if (fSpyed)
56  return pActual;
57  }
static LONG g_Reallocations
Definition: CComHeapPtr.cpp:20
#define InterlockedIncrement
Definition: armddk.h:53

◆ PreAlloc()

virtual SIZE_T STDMETHODCALLTYPE CMallocSpy::PreAlloc ( SIZE_T  cbRequest)
inlinevirtual

Implements IMallocSpy.

Definition at line 35 of file CComHeapPtr.cpp.

35 { return cbRequest; }

◆ PreDidAlloc()

virtual LPVOID STDMETHODCALLTYPE CMallocSpy::PreDidAlloc ( LPVOID  pRequest,
BOOL   
)
inlinevirtual

Implements IMallocSpy.

Definition at line 60 of file CComHeapPtr.cpp.

60 { return pRequest; }

◆ PreFree()

virtual LPVOID STDMETHODCALLTYPE CMallocSpy::PreFree ( LPVOID  pRequest,
BOOL   
)
inlinevirtual

Implements IMallocSpy.

Definition at line 41 of file CComHeapPtr.cpp.

41 { return pRequest; }

◆ PreGetSize()

virtual LPVOID STDMETHODCALLTYPE CMallocSpy::PreGetSize ( LPVOID  pRequest,
BOOL   
)
inlinevirtual

Implements IMallocSpy.

Definition at line 58 of file CComHeapPtr.cpp.

58 { return pRequest; }

◆ PreHeapMinimize()

virtual void STDMETHODCALLTYPE CMallocSpy::PreHeapMinimize ( )
inlinevirtual

Implements IMallocSpy.

Definition at line 62 of file CComHeapPtr.cpp.

62 {}

◆ PreRealloc()

virtual SIZE_T STDMETHODCALLTYPE CMallocSpy::PreRealloc ( LPVOID  pRequest,
SIZE_T  cbRequest,
LPVOID ppNewRequest,
BOOL   
)
inlinevirtual

Implements IMallocSpy.

Definition at line 47 of file CComHeapPtr.cpp.

48  {
49  *ppNewRequest = pRequest;
50  return cbRequest;
51  }

◆ QueryInterface()

STDMETHODIMP CMallocSpy::QueryInterface ( REFIID  riid,
void **  ppvObject 
)
inline

Implements IUnknown.

Definition at line 24 of file CComHeapPtr.cpp.

25  {
26  if (IsEqualGUID(riid, IID_IMallocSpy))
27  {
28  *ppvObject = this;
29  }
30  return S_OK;
31  }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ Release()

virtual ULONG STDMETHODCALLTYPE CMallocSpy::Release ( void  )
inlinevirtual

Implements IUnknown.

Definition at line 34 of file CComHeapPtr.cpp.

34 { return 1; }

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