ReactOS 0.4.15-dev-7958-gcd0bb1a
fxlookasidelist.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxLookasideList.hpp
8
9Abstract:
10
11Author:
12
13Environment:
14
15 kernel mode only
16
17Revision History:
18
19
20--*/
21
22#ifndef _FXLOOKASIDELIST_H_
23#define _FXLOOKASIDELIST_H_
24
25class FxLookasideList : public FxObject {
26
28
29public:
31 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
32 __in USHORT ObjectSize,
34 );
35
36 virtual
40 __in size_t BufferSize,
42 ) =0;
43
44 virtual
48 __out FxMemoryObject** PPMemory
49 ) =0;
50
51 size_t
53 VOID
54 )
55 {
56 return m_BufferSize;
57 }
58
59protected:
60 virtual
62 );
63
64 //
65 // Function used by IFxMemoryBuffer to return itself to the lookaside list
66 //
67 virtual
68 VOID
71 ) =0;
72
77 __in USHORT MemoryObjectSize,
79 );
80
81 PVOID
84 );
85
86 static
87 VOID
89 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
92 );
93
94public:
96
97protected:
99
101
103};
104
107
108public:
110 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
111 __in USHORT ObjectSize,
113 ) : FxLookasideList(FxDriverGlobals, ObjectSize, PoolTag)
114 {
115 }
116
117protected:
118 virtual
119 VOID
122 ) =0;
123};
124
125
126#endif // _FXLOOKASIDELIST_H_
LONG NTSTATUS
Definition: precomp.h:26
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
virtual VOID ReclaimPool(__inout PVOID Pool)=0
FxLookasideListFromPool(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ObjectSize, __in ULONG PoolTag)
PVOID InitObjectAlloc(__out_bcount(this->m_MemoryObjectSize) PVOID Alloc)
size_t GetBufferSize(VOID)
friend FxMemoryBufferFromLookaside
virtual _Must_inspect_result_ NTSTATUS Allocate(__out FxMemoryObject **PPMemory)=0
static VOID _Reclaim(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __inout PNPAGED_LOOKASIDE_LIST List, __in FxMemoryBufferFromLookaside *Memory)
virtual VOID Reclaim(__in FxMemoryBufferFromLookaside *Memory)=0
_Must_inspect_result_ NTSTATUS InitializeLookaside(__in USHORT BufferSize, __in USHORT MemoryObjectSize, __in PWDF_OBJECT_ATTRIBUTES MemoryAttributes)
WDF_OBJECT_ATTRIBUTES m_MemoryAttributes
virtual _Must_inspect_result_ NTSTATUS Initialize(__in size_t BufferSize, __in PWDF_OBJECT_ATTRIBUTES MemoryAttributes)=0
virtual ~FxLookasideList()
Definition: bufpool.h:50
#define __in
Definition: dbghelp.h:35
#define __out_bcount(x)
Definition: dbghelp.h:68
#define __inout
Definition: dbghelp.h:50
#define __out
Definition: dbghelp.h:62
#define _Must_inspect_result_
Definition: ms_sal.h:558
unsigned short USHORT
Definition: pedump.c:61
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES MemoryAttributes
Definition: wdfmemory.h:409
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
Definition: wdfmemory.h:169
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG PoolTag
Definition: wdfmemory.h:164
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST * PNPAGED_LOOKASIDE_LIST