ReactOS 0.4.15-dev-7958-gcd0bb1a
fxnpagedlookasidelistum.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxNPagedLookasideListUm.cpp
8
9Abstract:
10
11 This module implements a frameworks managed FxNPagedLookasideList
12
13Author:
14
15Environment:
16
17 user mode only
18
19Revision History:
20
21
22--*/
23
24#include "coreprivshared.hpp"
25
26#include "FxNPagedLookasideList.hpp"
27#include "FxMemoryBufferFromLookaside.hpp"
28
30 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
32 ) :
33 FxLookasideList(FxDriverGlobals, sizeof(*this), PoolTag)
34{
35}
36
38{
39}
40
44 __in size_t BufferSize,
46 )
47{
49
53
54 return status;
55}
56
60 __out FxMemoryObject** PPMemory
61 )
62{
64 PVOID p;
65
66 if (PPMemory == NULL) {
68 }
69
70 *PPMemory = NULL;
71
72 //
73 // Get the raw memory allocation.
74 //
76 if (p == NULL) {
78 }
79
81
82 //
83 // Construct new FxMemoryBufferFromLookaside
84 //
87
88 //
89 // pBuffer might be displaced if there is a debug extension
90 //
92
93 *PPMemory = pBuffer;
94
95 return STATUS_SUCCESS;
96}
97
98VOID
101 )
102{
104}
105
107 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
109 ) : FxLookasideListFromPool(FxDriverGlobals, sizeof(*this), PoolTag)
110{
112}
113
115 VOID
116 )
117{
119}
120
124 __in size_t BufferSize,
126 )
127{
129 return STATUS_UNSUCCESSFUL;
130}
131
135 __out FxMemoryObject** PPMemory
136 )
137{
139 return STATUS_UNSUCCESSFUL;
140}
141
142VOID
145 )
146{
148}
149
LONG NTSTATUS
Definition: precomp.h:26
PVOID InitObjectAlloc(__out_bcount(this->m_MemoryObjectSize) PVOID Alloc)
friend FxMemoryBufferFromLookaside
static VOID _Reclaim(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __inout PNPAGED_LOOKASIDE_LIST List, __in FxMemoryBufferFromLookaside *Memory)
_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)
virtual VOID Reclaim(__in FxMemoryBufferFromLookaside *Memory)
FxNPagedLookasideListFromPool(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in ULONG PoolTag)
virtual _Must_inspect_result_ NTSTATUS Allocate(__out FxMemoryObject **PPMemory)
virtual VOID Reclaim(__in FxMemoryBufferFromLookaside *Memory)
NPAGED_LOOKASIDE_LIST m_ObjectLookaside
virtual _Must_inspect_result_ NTSTATUS Allocate(__out FxMemoryObject **PPMemory)
FxNPagedLookasideList(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in ULONG PoolTag)
virtual _Must_inspect_result_ NTSTATUS Initialize(__in size_t BufferSize, __in PWDF_OBJECT_ATTRIBUTES MemoryAttributes)
static PVOID _GetBase(__in FxObject *Object)
Definition: fxobject.hpp:418
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
#define __in
Definition: dbghelp.h:35
#define __out
Definition: dbghelp.h:62
#define NULL
Definition: types.h:112
__inline PVOID FxAllocateFromNPagedLookasideList(_In_ PNPAGED_LOOKASIDE_LIST Lookaside, _In_opt_ size_t ElementSize=0)
Definition: fxglobalskm.h:565
GLfloat GLfloat p
Definition: glext.h:8902
#define ASSERT(a)
Definition: mode.c:44
#define _Must_inspect_result_
Definition: ms_sal.h:558
unsigned short USHORT
Definition: pedump.c:61
PVOID pBuffer
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: ps.c:97
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
VOID UfxVerifierTrapNotImpl()
_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
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList