geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From echobr...@apache.org
Subject [10/10] geode-native git commit: GEODE-3058: Removes Windows LFH enablement.
Date Wed, 28 Jun 2017 15:15:50 GMT
GEODE-3058: Removes Windows LFH enablement.


Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/791bb113
Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/791bb113
Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/791bb113

Branch: refs/heads/feature/GEODE-3143
Commit: 791bb113f3739d46f6188426ec33fdf5dd490fc6
Parents: 847344d
Author: Jacob Barrett <jbarrett@pivotal.io>
Authored: Wed Jun 28 00:37:08 2017 +0000
Committer: Ernest Burghardt <eburghardt@pivotal.io>
Committed: Wed Jun 28 08:13:52 2017 -0700

----------------------------------------------------------------------
 src/cppcache/src/DistributedSystem.cpp | 53 -----------------------------
 1 file changed, 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/791bb113/src/cppcache/src/DistributedSystem.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/DistributedSystem.cpp b/src/cppcache/src/DistributedSystem.cpp
index 965bfa5..72ae401 100644
--- a/src/cppcache/src/DistributedSystem.cpp
+++ b/src/cppcache/src/DistributedSystem.cpp
@@ -57,58 +57,6 @@ StatisticsManager* g_statMngr = nullptr;
 SystemProperties* g_sysProps = nullptr;
 }  // namespace
 
-namespace apache {
-namespace geode {
-namespace client {
-void setLFH() {
-#ifdef _WIN32
-  static HINSTANCE kernelMod = nullptr;
-  if (kernelMod == nullptr) {
-    kernelMod = GetModuleHandle("kernel32");
-    if (kernelMod != nullptr) {
-      typedef BOOL(WINAPI * PHSI)(
-          HANDLE HeapHandle, HEAP_INFORMATION_CLASS HeapInformationClass,
-          PVOID HeapInformation, SIZE_T HeapInformationLength);
-      typedef HANDLE(WINAPI * PGPH)();
-      PHSI pHSI = nullptr;
-      PGPH pGPH = nullptr;
-      if ((pHSI = (PHSI)GetProcAddress(kernelMod, "HeapSetInformation")) !=
-          nullptr) {
-        // The LFH API is available
-        /* Only set LFH for process heap; causes problems in C++ framework if
-        set for all heaps
-        HANDLE hProcessHeapHandles[1024];
-        DWORD dwRet;
-        ULONG heapFragValue = 2;
-
-        dwRet= GetProcessHeaps( 1024, hProcessHeapHandles );
-        for (DWORD i = 0; i < dwRet; i++)
-        {
-          HeapSetInformation( hProcessHeapHandles[i],
-            HeapCompatibilityInformation, &heapFragValue, sizeof(heapFragValue)
-        );
-        }
-        */
-        HANDLE hProcessHeapHandle;
-        ULONG heapFragValue = 2;
-        if ((pGPH = (PGPH)GetProcAddress(kernelMod, "GetProcessHeap")) !=
-            nullptr) {
-          hProcessHeapHandle = pGPH();
-          LOGCONFIG(
-              "Setting Microsoft Windows' low-fragmentation heap for use as "
-              "the main process heap.");
-          pHSI(hProcessHeapHandle, HeapCompatibilityInformation, &heapFragValue,
-               sizeof(heapFragValue));
-        }
-      }
-    }
-  }
-#endif
-}
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
 DistributedSystem::DistributedSystem(const char* name) : m_name(nullptr) {
   LOGDEBUG("DistributedSystem::DistributedSystem");
   if (name != nullptr) {
@@ -125,7 +73,6 @@ DistributedSystem::~DistributedSystem() { GF_SAFE_DELETE_ARRAY(m_name);
}
 DistributedSystemPtr DistributedSystem::connect(
     const char* name, const PropertiesPtr& configPtr) {
   ACE_Guard<ACE_Recursive_Thread_Mutex> disconnectGuard(*g_disconnectLock);
-  setLFH();
   if (m_connected == true) {
     throw AlreadyConnectedException(
         "DistributedSystem::connect: already connected, call getInstance to "


Mime
View raw message