== Sequencer ==
authorPeter Schlaile <peter@schlaile.de>
Sun, 2 Sep 2007 19:32:22 +0000 (19:32 +0000)
committerPeter Schlaile <peter@schlaile.de>
Sun, 2 Sep 2007 19:32:22 +0000 (19:32 +0000)
Bugfix:

The mem cache limitor didn't take mmap-allocated memory into account,
resulting in effectively disabling it, since all imbuf-data is
currently allocated using mmap.

intern/memutil/MEM_CacheLimiter.h

index c1c805b63101a92cc6ce9b21b3af44cefb588217..13fb6b23446a021b0930444ce76e0b5e36d382cc 100644 (file)
@@ -68,6 +68,7 @@ extern "C" {
        extern int MEM_CacheLimiter_get_maximum();
         // this is rather _ugly_!
         extern int mem_in_use;
        extern int MEM_CacheLimiter_get_maximum();
         // this is rather _ugly_!
         extern int mem_in_use;
+       extern int mmap_in_use;
 };
 #endif
 
 };
 #endif
 
@@ -148,7 +149,7 @@ public:
                        return;
                }
                for (iterator it = queue.begin(); 
                        return;
                }
                for (iterator it = queue.begin(); 
-                    it != queue.end() && mem_in_use > max;) {
+                    it != queue.end() && mem_in_use + mmap_in_use > max;) {
                        iterator jt = it;
                        ++it;
                        (*jt)->destroy_if_possible();
                        iterator jt = it;
                        ++it;
                        (*jt)->destroy_if_possible();