[arrayfire] 49/75: Fix to MemoryManager in debug mode

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:01:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.

commit cc59efa6f88dbf03682a7e3e3af09587adc98dc8
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Mon Feb 22 16:40:32 2016 -0500

    Fix to MemoryManager in debug mode
---
 src/backend/MemoryManager.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/backend/MemoryManager.cpp b/src/backend/MemoryManager.cpp
index b66dfc3..a761162 100644
--- a/src/backend/MemoryManager.cpp
+++ b/src/backend/MemoryManager.cpp
@@ -122,6 +122,8 @@ void MemoryManager::unlock(void *ptr, bool user_unlock)
         // Just free memory in debug mode
         if ((iter->second).bytes > 0) {
             this->nativeFree(iter->first);
+            current.total_buffers--;
+            current.total_bytes -= iter->second.bytes;
         }
     } else {
         // In regular mode, move buffer to free map

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list