Commit 9c482214 authored by Yoni Fogel's avatar Yoni Fogel

Closes #1341

Switches the heap to low fragmentation mode in windows.

git-svn-id: file:///svn/toku/tokudb.1032b@8421 c7de825b-a66e-492c-adef-691d508d4ae1
parent e5276196
......@@ -41,7 +41,24 @@ const char *toku_copyright_string = "Copyright (c) 2007, 2008 Tokutek Inc. All
/** The default maximum number of persistent locks in a lock tree */
const u_int32_t __toku_env_default_max_locks = 1000;
static void
toku_ydb_init_malloc(void) {
#if defined(TOKU_WINDOWS)
//Set the heap (malloc/free/realloc) to use the low fragmentation mode.
ULONG HeapFragValue = 2;
int r;
r = HeapSetInformation(GetProcessHeap(),
HeapCompatibilityInformation,
&HeapFragValue,
sizeof(HeapFragValue));
//if (r!=0) //Do some error output if necessary.
assert(r==0);
#endif
}
void toku_ydb_init(void) {
toku_ydb_init_malloc();
toku_brt_init();
toku_ydb_lock_init();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment