thread safe zmalloc used memory counter

This commit is contained in:
antirez
2010-01-15 08:52:20 -05:00
parent b04a5df979
commit 4ad37480f3
3 changed files with 43 additions and 9 deletions

View File

@ -6999,6 +6999,9 @@ static void vmInit(void) {
int pipefds[2];
size_t stacksize;
if (server.vm_max_threads != 0)
zmalloc_enable_thread_safeness(); /* we need thread safe zmalloc() */
server.vm_fp = fopen("/tmp/redisvm","w+b");
if (server.vm_fp == NULL) {
redisLog(REDIS_WARNING,"Impossible to open the swap file. Exiting.");