ReactOS
0.4.16-dev-122-g325d74c
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
24
class
FxMemoryBufferFromLookaside
:
public
FxMemoryObject
{
25
26
public
:
27
FxMemoryBufferFromLookaside
(
28
__in
PFX_DRIVER_GLOBALS
FxDriverGlobals,
29
__inout
FxLookasideList
*
Lookaside
,
30
__in
size_t
BufferSize
31
);
32
33
_Must_inspect_result_
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
,
40
__in
PWDF_OBJECT_ATTRIBUTES
Attributes
41
);
42
43
virtual
44
PVOID
45
GetBuffer
(
46
VOID
47
);
48
49
protected
:
50
FxMemoryBufferFromLookaside
(
51
__in
PFX_DRIVER_GLOBALS
FxDriverGlobals,
52
__inout
FxLookasideList
*
Lookaside
,
53
__in
size_t
BufferSize
,
54
__in
USHORT
ObjectSize
55
);
56
57
~FxMemoryBufferFromLookaside
(
58
);
59
60
VOID
61
Init
(
62
VOID
63
);
64
65
virtual
66
VOID
67
SelfDestruct
(
68
VOID
69
);
70
71
FxLookasideList
*
m_pLookaside
;
72
};
73
74
class
FxMemoryBufferFromPoolLookaside
:
public
FxMemoryBufferFromLookaside
{
75
public
:
76
FxMemoryBufferFromPoolLookaside
(
77
__in
PFX_DRIVER_GLOBALS
FxDriverGlobals,
78
__inout
FxLookasideList
*
Lookaside
,
79
__in
size_t
BufferSize
,
80
__in_bcount
(
BufferSize
)
PVOID
Buffer
81
);
82
83
_Must_inspect_result_
84
PVOID
85
operator
new
(
86
__in
size_t
Size
,
87
__in
PFX_DRIVER_GLOBALS
FxDriverGlobals,
88
__inout
PVOID
ValidMemory,
89
__in
PWDF_OBJECT_ATTRIBUTES
Attributes
90
);
91
92
virtual
93
PVOID
94
GetBuffer
(
95
VOID
96
)
97
{
98
return
m_Pool
;
99
}
100
101
protected
:
102
FxMemoryBufferFromPoolLookaside
(
103
__in
PFX_DRIVER_GLOBALS
FxDriverGlobals,
104
__inout
FxLookasideList
*
Lookaside
,
105
__in
size_t
BufferSize
,
106
__in_bcount
(
BufferSize
)
PVOID
Buffer
,
107
__in
USHORT
ObjectSize
108
);
109
110
virtual
111
VOID
112
SelfDestruct
(
113
VOID
114
);
115
116
PVOID
m_Pool
;
117
};
118
119
class
FxMemoryPagedBufferFromPoolLookaside
:
public
FxMemoryBufferFromPoolLookaside
{
120
public
:
121
FxMemoryPagedBufferFromPoolLookaside
(
122
__in
PFX_DRIVER_GLOBALS
FxDriverGlobals,
123
__inout
FxLookasideList
*
Lookaside
,
124
__in
size_t
BufferSize
,
125
__in_bcount
(
BufferSize
)
PVOID
Buffer
,
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_
Buffer
Definition:
bufpool.h:45
FxDeviceBase
Definition:
fxdevice.hpp:122
FxLookasideList
Definition:
fxlookasidelist.hpp:25
FxMemoryBufferFromLookaside
Definition:
fxmemorybufferfromlookaside.hpp:24
FxMemoryBufferFromLookaside::SelfDestruct
virtual VOID SelfDestruct(VOID)
Definition:
fxmemorybufferfromlookaside.cpp:191
FxMemoryBufferFromLookaside::~FxMemoryBufferFromLookaside
~FxMemoryBufferFromLookaside()
Definition:
fxmemorybufferfromlookaside.cpp:105
FxMemoryBufferFromLookaside::m_pLookaside
FxLookasideList * m_pLookaside
Definition:
fxmemorybufferfromlookaside.hpp:71
FxMemoryBufferFromPoolLookaside
Definition:
fxmemorybufferfromlookaside.hpp:74
FxMemoryBufferFromPoolLookaside::SelfDestruct
virtual VOID SelfDestruct(VOID)
Definition:
fxmemorybufferfromlookaside.cpp:259
FxMemoryBufferFromPoolLookaside::m_Pool
PVOID m_Pool
Definition:
fxmemorybufferfromlookaside.hpp:116
FxMemoryBufferFromPoolLookaside::GetBuffer
virtual PVOID GetBuffer(VOID)
Definition:
fxmemorybufferfromlookaside.hpp:94
FxMemoryObject
Definition:
fxmemoryobject.hpp:72
FxMemoryPagedBufferFromPoolLookaside
Definition:
fxmemorybufferfromlookaside.hpp:119
FxMemoryPagedBufferFromPoolLookaside::FxMemoryPagedBufferFromPoolLookaside
FxMemoryPagedBufferFromPoolLookaside(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __inout FxLookasideList *Lookaside, __in size_t BufferSize, __in_bcount(BufferSize) PVOID Buffer, __in FxDeviceBase *DeviceBase)
Definition:
fxmemorybufferfromlookaside.hpp:121
Init
Definition:
stterm-test.cc:47
__in
#define __in
Definition:
dbghelp.h:35
__in_bcount
#define __in_bcount(x)
Definition:
dbghelp.h:41
__inout
#define __inout
Definition:
dbghelp.h:50
BufferSize
#define BufferSize
Definition:
mmc.h:75
SetDeviceBase
pKey SetDeviceBase(pDevice)
GetBuffer
return pMemory GetBuffer()
void
Definition:
nsiface.idl:2307
_Must_inspect_result_
#define _Must_inspect_result_
Definition:
ms_sal.h:558
USHORT
unsigned short USHORT
Definition:
pedump.c:61
_FX_DRIVER_GLOBALS
Definition:
fxglobals.h:165
_WDF_OBJECT_ATTRIBUTES
Definition:
wdfobject.h:100
Attributes
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition:
wdfcommonbuffer.h:97
Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition:
wdfdevice.h:4533
BufferSize
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition:
wdfmemory.h:254
Lookaside
_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
sizeof
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
sdk
lib
drivers
wdf
shared
inc
private
common
fxmemorybufferfromlookaside.hpp
Generated on Sat Oct 12 2024 06:13:28 for ReactOS by
1.9.6