Guardedalloc: Reset peak memory should set peak to currently allocated memory
Otherwise statistics could be really funny looking.
This commit is contained in:
parent
3e534833e3
commit
9fc2c37328
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user