mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
[t:3988] #3988 Restore max mem in use statistic.
git-svn-id: file:///svn/toku/tokudb@36975 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
8bd8243a9e
commit
23698f1e96
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue