summaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-09-26 13:24:57 +0100
committerTorne (Richard Coles) <torne@google.com>2013-09-26 13:24:57 +0100
commit68043e1e95eeb07d5cae7aca370b26518b0867d6 (patch)
treecc6a216bce6aa9319a216327b73a07f49200dab5 /sandbox
parentcede44592cfb9ec370925d10c2df733349a94a82 (diff)
downloadchromium_org-68043e1e95eeb07d5cae7aca370b26518b0867d6.tar.gz
Merge from Chromium at DEPS revision 225410
This commit was generated by merge_to_master.py. Change-Id: Ifa1539ca216abb163295ee7a77f81bb67f52e178
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/sandbox_services.target.darwin-arm.mk2
-rw-r--r--sandbox/sandbox_services.target.darwin-mips.mk2
-rw-r--r--sandbox/sandbox_services.target.darwin-x86.mk2
-rw-r--r--sandbox/sandbox_services.target.linux-arm.mk2
-rw-r--r--sandbox/sandbox_services.target.linux-mips.mk2
-rw-r--r--sandbox/sandbox_services.target.linux-x86.mk2
-rw-r--r--sandbox/sandbox_services_headers.target.darwin-arm.mk2
-rw-r--r--sandbox/sandbox_services_headers.target.darwin-x86.mk2
-rw-r--r--sandbox/sandbox_services_headers.target.linux-arm.mk2
-rw-r--r--sandbox/sandbox_services_headers.target.linux-x86.mk2
-rw-r--r--sandbox/seccomp_bpf.target.darwin-arm.mk2
-rw-r--r--sandbox/seccomp_bpf.target.darwin-x86.mk2
-rw-r--r--sandbox/seccomp_bpf.target.linux-arm.mk2
-rw-r--r--sandbox/seccomp_bpf.target.linux-x86.mk2
-rw-r--r--sandbox/win/src/app_container.cc30
-rw-r--r--sandbox/win/src/internal_types.h7
-rw-r--r--sandbox/win/src/sandbox_nt_util.cc27
17 files changed, 38 insertions, 54 deletions
diff --git a/sandbox/sandbox_services.target.darwin-arm.mk b/sandbox/sandbox_services.target.darwin-arm.mk
index 303fa27be3..dc2dafd552 100644
--- a/sandbox/sandbox_services.target.darwin-arm.mk
+++ b/sandbox/sandbox_services.target.darwin-arm.mk
@@ -61,7 +61,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -144,7 +143,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services.target.darwin-mips.mk b/sandbox/sandbox_services.target.darwin-mips.mk
index 50867ff679..d224613198 100644
--- a/sandbox/sandbox_services.target.darwin-mips.mk
+++ b/sandbox/sandbox_services.target.darwin-mips.mk
@@ -60,7 +60,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -142,7 +141,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services.target.darwin-x86.mk b/sandbox/sandbox_services.target.darwin-x86.mk
index 1b72cef125..5c7a03fe5b 100644
--- a/sandbox/sandbox_services.target.darwin-x86.mk
+++ b/sandbox/sandbox_services.target.darwin-x86.mk
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -149,7 +148,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services.target.linux-arm.mk b/sandbox/sandbox_services.target.linux-arm.mk
index 303fa27be3..dc2dafd552 100644
--- a/sandbox/sandbox_services.target.linux-arm.mk
+++ b/sandbox/sandbox_services.target.linux-arm.mk
@@ -61,7 +61,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -144,7 +143,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services.target.linux-mips.mk b/sandbox/sandbox_services.target.linux-mips.mk
index 50867ff679..d224613198 100644
--- a/sandbox/sandbox_services.target.linux-mips.mk
+++ b/sandbox/sandbox_services.target.linux-mips.mk
@@ -60,7 +60,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -142,7 +141,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services.target.linux-x86.mk b/sandbox/sandbox_services.target.linux-x86.mk
index 1b72cef125..5c7a03fe5b 100644
--- a/sandbox/sandbox_services.target.linux-x86.mk
+++ b/sandbox/sandbox_services.target.linux-x86.mk
@@ -63,7 +63,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -149,7 +148,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services_headers.target.darwin-arm.mk b/sandbox/sandbox_services_headers.target.darwin-arm.mk
index e5d9efe81b..d0eb705c3e 100644
--- a/sandbox/sandbox_services_headers.target.darwin-arm.mk
+++ b/sandbox/sandbox_services_headers.target.darwin-arm.mk
@@ -60,7 +60,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -141,7 +140,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services_headers.target.darwin-x86.mk b/sandbox/sandbox_services_headers.target.darwin-x86.mk
index eb001eb84e..e07dffadb1 100644
--- a/sandbox/sandbox_services_headers.target.darwin-x86.mk
+++ b/sandbox/sandbox_services_headers.target.darwin-x86.mk
@@ -62,7 +62,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -146,7 +145,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services_headers.target.linux-arm.mk b/sandbox/sandbox_services_headers.target.linux-arm.mk
index e5d9efe81b..d0eb705c3e 100644
--- a/sandbox/sandbox_services_headers.target.linux-arm.mk
+++ b/sandbox/sandbox_services_headers.target.linux-arm.mk
@@ -60,7 +60,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -141,7 +140,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/sandbox_services_headers.target.linux-x86.mk b/sandbox/sandbox_services_headers.target.linux-x86.mk
index eb001eb84e..e07dffadb1 100644
--- a/sandbox/sandbox_services_headers.target.linux-x86.mk
+++ b/sandbox/sandbox_services_headers.target.linux-x86.mk
@@ -62,7 +62,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -146,7 +145,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/seccomp_bpf.target.darwin-arm.mk b/sandbox/seccomp_bpf.target.darwin-arm.mk
index 59d42d349c..b99994c372 100644
--- a/sandbox/seccomp_bpf.target.darwin-arm.mk
+++ b/sandbox/seccomp_bpf.target.darwin-arm.mk
@@ -70,7 +70,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -152,7 +151,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/seccomp_bpf.target.darwin-x86.mk b/sandbox/seccomp_bpf.target.darwin-x86.mk
index cfb22c7748..54b4deff85 100644
--- a/sandbox/seccomp_bpf.target.darwin-x86.mk
+++ b/sandbox/seccomp_bpf.target.darwin-x86.mk
@@ -72,7 +72,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -157,7 +156,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/seccomp_bpf.target.linux-arm.mk b/sandbox/seccomp_bpf.target.linux-arm.mk
index 59d42d349c..b99994c372 100644
--- a/sandbox/seccomp_bpf.target.linux-arm.mk
+++ b/sandbox/seccomp_bpf.target.linux-arm.mk
@@ -70,7 +70,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -152,7 +151,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/seccomp_bpf.target.linux-x86.mk b/sandbox/seccomp_bpf.target.linux-x86.mk
index cfb22c7748..54b4deff85 100644
--- a/sandbox/seccomp_bpf.target.linux-x86.mk
+++ b/sandbox/seccomp_bpf.target.linux-x86.mk
@@ -72,7 +72,6 @@ MY_CFLAGS_Debug := \
MY_DEFS_Debug := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
@@ -157,7 +156,6 @@ MY_CFLAGS_Release := \
MY_DEFS_Release := \
'-DANGLE_DX11' \
- '-DWTF_VECTOR_INITIAL_SIZE=4' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
diff --git a/sandbox/win/src/app_container.cc b/sandbox/win/src/app_container.cc
index ee978b9515..826b5614f7 100644
--- a/sandbox/win/src/app_container.cc
+++ b/sandbox/win/src/app_container.cc
@@ -23,6 +23,17 @@ PSID ConvertSid(const string16& sid) {
return local_sid;
}
+template <typename T>
+T BindFunction(const char* name) {
+ HMODULE module = GetModuleHandle(sandbox::kKerneldllName);
+ void* function = GetProcAddress(module, name);
+ if (!function) {
+ module = GetModuleHandle(sandbox::kKernelBasedllName);
+ function = GetProcAddress(module, name);
+ }
+ return reinterpret_cast<T>(function);
+}
+
} // namespace
namespace sandbox {
@@ -94,9 +105,8 @@ ResultCode CreateAppContainer(const string16& sid, const string16& name) {
static AppContainerRegisterSidPtr AppContainerRegisterSid = NULL;
if (!AppContainerRegisterSid) {
- HMODULE module = GetModuleHandle(kKerneldllName);
- AppContainerRegisterSid = reinterpret_cast<AppContainerRegisterSidPtr>(
- GetProcAddress(module, "AppContainerRegisterSid"));
+ AppContainerRegisterSid =
+ BindFunction<AppContainerRegisterSidPtr>("AppContainerRegisterSid");
}
ResultCode operation_result = SBOX_ERROR_GENERIC;
@@ -120,9 +130,8 @@ ResultCode DeleteAppContainer(const string16& sid) {
static AppContainerUnregisterSidPtr AppContainerUnregisterSid = NULL;
if (!AppContainerUnregisterSid) {
- HMODULE module = GetModuleHandle(kKerneldllName);
- AppContainerUnregisterSid = reinterpret_cast<AppContainerUnregisterSidPtr>(
- GetProcAddress(module, "AppContainerUnregisterSid"));
+ AppContainerUnregisterSid =
+ BindFunction<AppContainerUnregisterSidPtr>("AppContainerUnregisterSid");
}
ResultCode operation_result = SBOX_ERROR_GENERIC;
@@ -150,11 +159,10 @@ string16 LookupAppContainer(const string16& sid) {
static AppContainerFreeMemoryPtr AppContainerFreeMemory = NULL;
if (!AppContainerLookupMoniker || !AppContainerFreeMemory) {
- HMODULE module = GetModuleHandle(kKerneldllName);
- AppContainerLookupMoniker = reinterpret_cast<AppContainerLookupMonikerPtr>(
- GetProcAddress(module, "AppContainerLookupMoniker"));
- AppContainerFreeMemory = reinterpret_cast<AppContainerFreeMemoryPtr>(
- GetProcAddress(module, "AppContainerFreeMemory"));
+ AppContainerLookupMoniker =
+ BindFunction<AppContainerLookupMonikerPtr>("AppContainerLookupMoniker");
+ AppContainerFreeMemory =
+ BindFunction<AppContainerFreeMemoryPtr>("AppContainerFreeMemory");
}
if (!AppContainerLookupMoniker || !AppContainerFreeMemory)
diff --git a/sandbox/win/src/internal_types.h b/sandbox/win/src/internal_types.h
index db969aadd5..d5e2620cce 100644
--- a/sandbox/win/src/internal_types.h
+++ b/sandbox/win/src/internal_types.h
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SANDBOX_SRC_INTERNAL_TYPES_H_
-#define SANDBOX_SRC_INTERNAL_TYPES_H_
+#ifndef SANDBOX_WIN_SRC_INTERNAL_TYPES_H_
+#define SANDBOX_WIN_SRC_INTERNAL_TYPES_H_
namespace sandbox {
const wchar_t kNtdllName[] = L"ntdll.dll";
const wchar_t kKerneldllName[] = L"kernel32.dll";
+const wchar_t kKernelBasedllName[] = L"kernelbase.dll";
// Defines the supported C++ types encoding to numeric id. Like a poor's man
// RTTI. Note that true C++ RTTI will not work because the types are not
@@ -72,4 +73,4 @@ class IPCInt {
} // namespace sandbox
-#endif // SANDBOX_SRC_INTERNAL_TYPES_H_
+#endif // SANDBOX_WIN_SRC_INTERNAL_TYPES_H_
diff --git a/sandbox/win/src/sandbox_nt_util.cc b/sandbox/win/src/sandbox_nt_util.cc
index 123a26e36b..7131461128 100644
--- a/sandbox/win/src/sandbox_nt_util.cc
+++ b/sandbox/win/src/sandbox_nt_util.cc
@@ -13,7 +13,7 @@ namespace sandbox {
// This is the list of all imported symbols from ntdll.dll.
SANDBOX_INTERCEPT NtExports g_nt = { NULL };
-} // namespace
+} // namespace sandbox
namespace {
@@ -22,26 +22,20 @@ void* AllocateNearTo(void* source, size_t size) {
using sandbox::g_nt;
// Start with 1 GB above the source.
- const unsigned int kOneGB = 0x40000000;
+ const size_t kOneGB = 0x40000000;
void* base = reinterpret_cast<char*>(source) + kOneGB;
SIZE_T actual_size = size;
ULONG_PTR zero_bits = 0; // Not the correct type if used.
ULONG type = MEM_RESERVE;
- if (reinterpret_cast<SIZE_T>(source) > 0x7ff80000000) {
- // We are at the top of the address space. Let's try the highest available
- // address.
- base = NULL;
- type |= MEM_TOP_DOWN;
- }
-
NTSTATUS ret;
int attempts = 0;
- for (; attempts < 20; attempts++) {
+ for (; attempts < 41; attempts++) {
ret = g_nt.AllocateVirtualMemory(NtCurrentProcess, &base, zero_bits,
&actual_size, type, PAGE_READWRITE);
if (NT_SUCCESS(ret)) {
- if (base < source) {
+ if (base < source ||
+ base >= reinterpret_cast<char*>(source) + 4 * kOneGB) {
// We won't be able to patch this dll.
VERIFY_SUCCESS(g_nt.FreeVirtualMemory(NtCurrentProcess, &base, &size,
MEM_RELEASE));
@@ -50,11 +44,20 @@ void* AllocateNearTo(void* source, size_t size) {
break;
}
+ if (attempts == 30) {
+ // Try the first GB.
+ base = reinterpret_cast<char*>(source);
+ } else if (attempts == 40) {
+ // Try the highest available address.
+ base = NULL;
+ type |= MEM_TOP_DOWN;
+ }
+
// Try 100 MB higher.
base = reinterpret_cast<char*>(base) + 100 * 0x100000;
};
- if (attempts == 20)
+ if (attempts == 41)
return NULL;
ret = g_nt.AllocateVirtualMemory(NtCurrentProcess, &base, zero_bits,