ReactOS  0.4.15-dev-3439-g2693a26
fxmemorybufferfromlookaside.hpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxMemoryBufferFromLookaside.hpp
8 
9 Abstract:
10 
11 Author:
12 
13 Environment:
14 
15  kernel mode only
16 
17 Revision History:
18 
19 --*/
20 
21 #ifndef _FXMEMORYBUFFERFROMLOOKASIDE_H_
22 #define _FXMEMORYBUFFERFROMLOOKASIDE_H_
23 
25 
26 public:
28  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
30  __in size_t BufferSize
31  );
32 
34  PVOID
35  operator new(
36  __in size_t Size,
37  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
38  __inout PVOID ValidMemory,
39  __in size_t BufferSize,
41  );
42 
43  virtual
44  PVOID
45  GetBuffer(
46  VOID
47  );
48 
49 protected:
51  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
53  __in size_t BufferSize,
54  __in USHORT ObjectSize
55  );
56 
58  );
59 
60  VOID
61  Init(
62  VOID
63  );
64 
65  virtual
66  VOID
68  VOID
69  );
70 
72 };
73 
75 public:
77  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
79  __in size_t BufferSize,
81  );
82 
84  PVOID
85  operator new(
86  __in size_t Size,
87  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
88  __inout PVOID ValidMemory,
90  );
91 
92  virtual
93  PVOID
95  VOID
96  )
97  {
98  return m_Pool;
99  }
100 
101 protected:
103  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
105  __in size_t BufferSize,
107  __in USHORT ObjectSize
108  );
109 
110  virtual
111  VOID
112  SelfDestruct(
113  VOID
114  );
115 
117 };
118 
120 public:
122  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
124  __in size_t BufferSize,
126  __in FxDeviceBase* DeviceBase
127  ) : FxMemoryBufferFromPoolLookaside(FxDriverGlobals,
128  Lookaside,
129  BufferSize,
130  Buffer,
131  sizeof(*this))
132  {
133  SetDeviceBase(DeviceBase);
134  }
135 };
136 #endif // _FXMEMORYBUFFERFROMLOOKASIDE_H_
#define __in_bcount(x)
Definition: dbghelp.h:41
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_opt_ ULONG _Out_ WDFLOOKASIDE * Lookaside
Definition: wdfmemory.h:407
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
VOID SetDeviceBase(__in CfxDeviceBase *DeviceBase)
Definition: fxobject.hpp:797
Definition: bufpool.h:45
FxMemoryBufferFromPoolLookaside(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __inout FxLookasideList *Lookaside, __in size_t BufferSize, __in_bcount(BufferSize) PVOID Buffer)
#define __inout
Definition: dbghelp.h:50
#define _Must_inspect_result_
Definition: ms_sal.h:558
unsigned short USHORT
Definition: pedump.c:61
FxMemoryPagedBufferFromPoolLookaside(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __inout FxLookasideList *Lookaside, __in size_t BufferSize, __in_bcount(BufferSize) PVOID Buffer, __in FxDeviceBase *DeviceBase)
FxMemoryBufferFromLookaside(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __inout FxLookasideList *Lookaside, __in size_t BufferSize)
#define __in
Definition: dbghelp.h:35
#define BufferSize
Definition: mmc.h:75
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes