Guardedalloc: Reset peak memory should set peak to currently allocated memory

Otherwise statistics could be really funny looking.
This commit is contained in:
Sergey Sharybin 2015-02-19 13:14:06 +05:00
parent 3e534833e3
commit 9fc2c37328
2 changed files with 2 additions and 2 deletions

View File

@ -1148,7 +1148,7 @@ size_t MEM_guarded_get_peak_memory(void)
void MEM_guarded_reset_peak_memory(void)
{
mem_lock_thread();
peak_mem = 0;
peak_mem = mem_in_use;
mem_unlock_thread();
}

View File

@ -478,7 +478,7 @@ unsigned int MEM_lockfree_get_memory_blocks_in_use(void)
/* dummy */
void MEM_lockfree_reset_peak_memory(void)
{
peak_mem = 0;
peak_mem = mem_in_use;
}
size_t MEM_lockfree_get_peak_memory(void)