summaryrefslogtreecommitdiff
path: root/network/wlan/WIFICX/drivercode/memorymanagement.cpp
diff options
context:
space:
mode:
authorYang You (UU) <[email protected]>2025-11-11 16:07:58 -0800
committerYang You (UU) <[email protected]>2025-11-11 16:07:58 -0800
commitfe139d460e690a27cc98bb9c077eeb5964fc7877 (patch)
treef358ad588aa316ef00e0a4ce57f6c73a301f1248 /network/wlan/WIFICX/drivercode/memorymanagement.cpp
parentbddbce760509546060b3ccc28a9891b2412d2824 (diff)
have the HAL layer created for correctly demo the Interface of WIfireuqest, meanwhile have the WPPTrace enabled for both um and km
Diffstat (limited to 'network/wlan/WIFICX/drivercode/memorymanagement.cpp')
-rw-r--r--network/wlan/WIFICX/drivercode/memorymanagement.cpp51
1 files changed, 25 insertions, 26 deletions
diff --git a/network/wlan/WIFICX/drivercode/memorymanagement.cpp b/network/wlan/WIFICX/drivercode/memorymanagement.cpp
index 8c6d56d0..de231d8c 100644
--- a/network/wlan/WIFICX/drivercode/memorymanagement.cpp
+++ b/network/wlan/WIFICX/drivercode/memorymanagement.cpp
@@ -1,35 +1,34 @@
-/*++
-
-Copyright (c) Microsoft Corporation. All rights reserved.
-
- Microsoft Confidential
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
- KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
- PURPOSE.
-
-Module Name:
-
- new.cpp
-
-Abstract:
-
- Test only stub WDI driver (C++ portions)
+// Copyright (C) Microsoft Corporation. All rights reserved.
+#include "precomp.h"
-Environment:
+#ifndef _KERNEL_MODE
+#include <intrin.h> // for _ReturnAddress for user mode
+#endif // UM
- Kernel mode
+typedef struct _PLACEMENT_NEW_ALLOCATION_CONTEXT
+{
+ size_t cbMaxSize;
+ _Field_size_bytes_(cbMaxSize) void* pbBuffer;
+} PLACEMENT_NEW_ALLOCATION_CONTEXT, * PPLACEMENT_NEW_ALLOCATION_CONTEXT;
+typedef const PLACEMENT_NEW_ALLOCATION_CONTEXT* PCPLACEMENT_NEW_ALLOCATION_CONTEXT;
-Author:
+// for FreeWdfMemoryBuffer to correct get
+// the handle to free the memory
+struct WIFI_IHV_MEMORY_HEADER
+{
+ size_t HeaderSize;
+ WDFMEMORY WdfMemoryHandle;
+};
+// for tracking memory leaks
+struct WIFI_IHV_MEMORY_CONTEXT
+{
+ size_t ContextSize;
+ void* pvCaller;
+};
---*/
-#include "precomp.h"
+WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(WIFI_IHV_MEMORY_CONTEXT, GetWificxIhvMemoryContextFromHandle);
-#ifndef _KERNEL_MODE
-#include <intrin.h> // for _ReturnAddress for user mode
-#endif // UM
void* AllocateWdfMemoryBuffer(size_t Size, _In_ void* CallerForMemoryLeakTracking)
{