Commit 2e57e663 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3988] #3988 Restore max mem in use statistic.

git-svn-id: file:///svn/toku/tokudb@36975 c7de825b-a66e-492c-adef-691d508d4ae1
parent 870b7d6b
......@@ -46,7 +46,7 @@ void *toku_malloc(size_t size) {
__sync_add_and_fetch(&status.malloc_count, 1);
__sync_add_and_fetch(&status.requested,size);
__sync_add_and_fetch(&status.used, used);
if (0) set_max(status.used, status.freed);
set_max(status.used, status.freed);
} else {
__sync_add_and_fetch(&status.malloc_fail, 1);
}
......@@ -71,7 +71,7 @@ toku_realloc(void *p, size_t size) {
__sync_add_and_fetch(&status.requested, size);
__sync_add_and_fetch(&status.used, used);
__sync_add_and_fetch(&status.freed, used_orig);
if (0) set_max(status.used, status.freed);
set_max(status.used, status.freed);
} else {
__sync_add_and_fetch(&status.realloc_fail, 1);
}
......@@ -117,7 +117,7 @@ toku_xmalloc(size_t size) {
__sync_add_and_fetch(&status.malloc_count, 1);
__sync_add_and_fetch(&status.requested, size);
__sync_add_and_fetch(&status.used, used);
if (0) set_max(status.used, status.freed);
set_max(status.used, status.freed);
return p;
}
......@@ -140,7 +140,7 @@ toku_xrealloc(void *v, size_t size) {
__sync_add_and_fetch(&status.requested, size);
__sync_add_and_fetch(&status.used, used);
__sync_add_and_fetch(&status.freed, used_orig);
if (0) set_max(status.used, status.freed);
set_max(status.used, status.freed);
return p;
}
......
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