Ver Fonte

Windows fix.

Adam Ierymenko há 5 anos atrás
pai
commit
c17ac16728
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      core/Utils.hpp

+ 2 - 2
core/Utils.hpp

@@ -103,7 +103,7 @@ extern const uint64_t s_mapNonce;
 static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noexcept
 {
 #ifdef __WINDOWS__
-	//VirtualLock(p, l);
+	VirtualLock(const_cast<LPVOID>(reinterpret_cast<LPVOID>(p)), l);
 #else
 	mlock(p, l);
 #endif
@@ -118,7 +118,7 @@ static ZT_INLINE void memoryLock(const void *const p, const unsigned int l) noex
 static ZT_INLINE void memoryUnlock(const void *const p, const unsigned int l) noexcept
 {
 #ifdef __WINDOWS__
-	//VirtualUnlock(p, l);
+	VirtualUnlock(const_cast<LPVOID>(reinterpret_cast<LPVOID>(p)), l);
 #else
 	munlock(p, l);
 #endif