Version: 1
-Previous: 657d5295fa9ea07552835b8ebfc7372a3f7dd957
-Head: 6422820fae706c1d0d0e898b334e02fb510e2536
+Previous: 24abe5a8a174866b46cb6b41e79920e362823a0a
+Head: 732748a188d7481eb072170119afd02837a62983
Applied:
- nd-heap: f6f1913db0732dc1e845cf83135f75487349eb6a
- refresh-temp: 6422820fae706c1d0d0e898b334e02fb510e2536
+ nd-heap: 732748a188d7481eb072170119afd02837a62983
Unapplied:
srq: 0024a4123a3ed01d41c946126590641f9f76bc20
wv-rm-ioctl: 2c4f8b27f89993bc9c1215e8c358046b2934f755
Bottom: 06cdce656914daffeb60188020c0cbccef3f6806
-Top: 06cdce656914daffeb60188020c0cbccef3f6806
+Top: e6b93b2a0b77f4869cab7c1190fc59f99ef4422b
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2010-07-26 14:48:18 -0700
---
-
+diff --git a/trunk/ulp/netdirect2/user/nd_base.h b/trunk/ulp/netdirect2/user/nd_base.h
+index d11b1a0..07addbe 100644
+--- a/trunk/ulp/netdirect2/user/nd_base.h
++++ b/trunk/ulp/netdirect2/user/nd_base.h
+@@ -51,14 +51,16 @@ public:
+ protected:\r
+ };\r
+ \r
++extern HANDLE g_hHeap;\r
++\r
+ __inline void* __cdecl operator new(size_t size)\r
+ {\r
+- return HeapAlloc(GetProcessHeap(), 0, size);\r
++ return HeapAlloc(g_hHeap, 0, size);\r
+ }\r
+ \r
+ __inline void __cdecl operator delete(void *pObj)\r
+ {\r
+- HeapFree(GetProcessHeap(), 0, pObj);\r
++ HeapFree(h_gHeap, 0, pObj);\r
+ }\r
+ \r
+ HRESULT NDConvertWVStatus(HRESULT hr);\r
+diff --git a/trunk/ulp/netdirect2/user/nd_main.cpp b/trunk/ulp/netdirect2/user/nd_main.cpp
+index a27764d..43c2009 100644
+--- a/trunk/ulp/netdirect2/user/nd_main.cpp
++++ b/trunk/ulp/netdirect2/user/nd_main.cpp
+@@ -32,6 +32,7 @@
+ #include <stdio.h>\r
+ #include "nd_provider.h"\r
+ \r
++HANDLE g_hHeap;\r
+ \r
+ extern "C" {\r
+ \r
+@@ -44,10 +45,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+ {\r
+ switch (dwReason) {\r
+ case DLL_PROCESS_ATTACH:\r
++ if (_DllMainCRTStartupForGS(hInstance, dwReason, lpReserved)) {\r
++ return FALSE;\r
++ }\r
++\r
++ g_hHeap = HeapCreate(0, 0, 0);\r
++ return (g_hHeap != NULL);\r
+ case DLL_PROCESS_DETACH:\r
++ if (g_hHeap != NULL) {\r
++ HeapDestroy(g_hHeap);\r
++ }\r
+ return _DllMainCRTStartupForGS(hInstance, dwReason, lpReserved);\r
+ default:\r
+- return TRUE;\r
++ return FALSE;\r
+ }\r
+ }
+++ /dev/null
-Bottom: 06cdce656914daffeb60188020c0cbccef3f6806
-Top: e6b93b2a0b77f4869cab7c1190fc59f99ef4422b
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2010-07-26 14:53:58 -0700
-
-Refresh of nd-heap
-
----
-
-diff --git a/trunk/ulp/netdirect2/user/nd_base.h b/trunk/ulp/netdirect2/user/nd_base.h
-index d11b1a0..07addbe 100644
---- a/trunk/ulp/netdirect2/user/nd_base.h
-+++ b/trunk/ulp/netdirect2/user/nd_base.h
-@@ -51,14 +51,16 @@ public:
- protected:\r
- };\r
- \r
-+extern HANDLE g_hHeap;\r
-+\r
- __inline void* __cdecl operator new(size_t size)\r
- {\r
-- return HeapAlloc(GetProcessHeap(), 0, size);\r
-+ return HeapAlloc(g_hHeap, 0, size);\r
- }\r
- \r
- __inline void __cdecl operator delete(void *pObj)\r
- {\r
-- HeapFree(GetProcessHeap(), 0, pObj);\r
-+ HeapFree(h_gHeap, 0, pObj);\r
- }\r
- \r
- HRESULT NDConvertWVStatus(HRESULT hr);\r
-diff --git a/trunk/ulp/netdirect2/user/nd_main.cpp b/trunk/ulp/netdirect2/user/nd_main.cpp
-index a27764d..43c2009 100644
---- a/trunk/ulp/netdirect2/user/nd_main.cpp
-+++ b/trunk/ulp/netdirect2/user/nd_main.cpp
-@@ -32,6 +32,7 @@
- #include <stdio.h>\r
- #include "nd_provider.h"\r
- \r
-+HANDLE g_hHeap;\r
- \r
- extern "C" {\r
- \r
-@@ -44,10 +45,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
- {\r
- switch (dwReason) {\r
- case DLL_PROCESS_ATTACH:\r
-+ if (_DllMainCRTStartupForGS(hInstance, dwReason, lpReserved)) {\r
-+ return FALSE;\r
-+ }\r
-+\r
-+ g_hHeap = HeapCreate(0, 0, 0);\r
-+ return (g_hHeap != NULL);\r
- case DLL_PROCESS_DETACH:\r
-+ if (g_hHeap != NULL) {\r
-+ HeapDestroy(g_hHeap);\r
-+ }\r
- return _DllMainCRTStartupForGS(hInstance, dwReason, lpReserved);\r
- default:\r
-- return TRUE;\r
-+ return FALSE;\r
- }\r
- }