Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-02-19 11:14:06 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-02-19 11:14:06 +0300
commit9fc2c3732878288bb3a69e163a702d6e46ad95ef (patch)
tree387f0980700f812b6b86a17ebf2cee9ecd711e24 /intern/guardedalloc
parent3e534833e3a83ceecef35aa6c32764971e3b086e (diff)
Guardedalloc: Reset peak memory should set peak to currently allocated memory
Otherwise statistics could be really funny looking.
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/intern/mallocn_guarded_impl.c2
-rw-r--r--intern/guardedalloc/intern/mallocn_lockfree_impl.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c
index 9a503422282..bdcace243d9 100644
--- a/intern/guardedalloc/intern/mallocn_guarded_impl.c
+++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c
@@ -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();
}
diff --git a/intern/guardedalloc/intern/mallocn_lockfree_impl.c b/intern/guardedalloc/intern/mallocn_lockfree_impl.c
index b5f3d1b15dc..a80d67c3e80 100644
--- a/intern/guardedalloc/intern/mallocn_lockfree_impl.c
+++ b/intern/guardedalloc/intern/mallocn_lockfree_impl.c
@@ -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)