ReactOS 0.4.15-dev-7918-g2a2556c
fxmemorybufferfromlookaside.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxMemoryBufferFromLookaside.hpp
8
9Abstract:
10
11Author:
12
13Environment:
14
15 kernel mode only
16
17Revision History:
18
19--*/
20
21#ifndef _FXMEMORYBUFFERFROMLOOKASIDE_H_
22#define _FXMEMORYBUFFERFROMLOOKASIDE_H_
23
25
26public:
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
46 VOID
47 );
48
49protected:
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
75public:
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
101protected:
103 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
105 __in size_t BufferSize,
107 __in USHORT ObjectSize
108 );
109
110 virtual
111 VOID
113 VOID
114 );
115
117};
118
120public:
122 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
124 __in size_t BufferSize,
126 __in FxDeviceBase* DeviceBase
127 ) : FxMemoryBufferFromPoolLookaside(FxDriverGlobals,
128 Lookaside,
130 Buffer,
131 sizeof(*this))
132 {
133 SetDeviceBase(DeviceBase);
134 }
135};
136#endif // _FXMEMORYBUFFERFROMLOOKASIDE_H_
Definition: bufpool.h:45
FxMemoryPagedBufferFromPoolLookaside(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __inout FxLookasideList *Lookaside, __in size_t BufferSize, __in_bcount(BufferSize) PVOID Buffer, __in FxDeviceBase *DeviceBase)
#define __in
Definition: dbghelp.h:35
#define __in_bcount(x)
Definition: dbghelp.h:41
#define __inout
Definition: dbghelp.h:50
#define BufferSize
Definition: mmc.h:75
pKey SetDeviceBase(pDevice)
return pMemory GetBuffer()
#define _Must_inspect_result_
Definition: ms_sal.h:558
unsigned short USHORT
Definition: pedump.c:61
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_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:414
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList