diff options
author | Joseph Eagar <joeedh@gmail.com> | 2010-05-04 16:31:24 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2010-05-04 16:31:24 +0400 |
commit | a7cbd5008e830224e73e2e55f89d0783ded422e5 (patch) | |
tree | 63f8d80c1db62e0a8f71db6d89de9d95e4b91fa0 /source/blender/render | |
parent | cef3e3099a8d808474237e26cf373b3943897cb3 (diff) |
merging revisions 28564-28569 from render branch into trunk
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 0ebcf53d393..c578d3ea502 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -137,11 +137,20 @@ static int default_break(void *unused) {return G.afbreek == 1;} static void stats_background(void *unused, RenderStats *rs) { - uintptr_t mem_in_use= MEM_get_memory_in_use(); - float megs_used_memory= mem_in_use/(1024.0*1024.0); char str[400], *spos= str; - - spos+= sprintf(spos, "Fra:%d Mem:%.2fM ", rs->cfra, megs_used_memory); + uintptr_t mem_in_use, mmap_in_use, peak_memory; + float megs_used_memory, mmap_used_memory, megs_peak_memory; + + mem_in_use= MEM_get_memory_in_use(); + mmap_in_use= MEM_get_mapped_memory_in_use(); + peak_memory = MEM_get_peak_memory(); + + megs_used_memory= (mem_in_use-mmap_in_use)/(1024.0*1024.0); + mmap_used_memory= (mmap_in_use)/(1024.0*1024.0); + megs_peak_memory = (peak_memory)/(1024.0*1024.0); + + spos+= sprintf(spos, "Fra:%d Mem:%.2fM (%.2fM, combined peak %.2fM) ", rs->cfra, + megs_used_memory, mmap_used_memory, megs_peak_memory); if(rs->curfield) spos+= sprintf(spos, "Field %d ", rs->curfield); @@ -2727,6 +2736,7 @@ void RE_BlenderFrame(Render *re, Scene *scene, SceneRenderLayer *srl, unsigned i scene->r.cfra= frame; if(render_initialize_from_scene(re, scene, srl, lay, 0, 0)) { + MEM_reset_peak_memory(); do_render_all_options(re); } |