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:
authorJoseph Eagar <joeedh@gmail.com>2009-10-23 03:22:05 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-10-23 03:22:05 +0400
commit8f788c64db587e74079d812dbcea40c2bd4b91ff (patch)
treec767e8318a9e7aded16be6cab2042f3ea11e7912 /intern/guardedalloc
parent36bb566d4e6e06e08d782d610d60d755cbda2396 (diff)
merge with trunk/2.5 at r23876
[[Split portion of a mixed commit.]]
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h2
-rw-r--r--intern/guardedalloc/intern/mallocn.c24
2 files changed, 21 insertions, 5 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index 6cead013895..60e93ad4bee 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -27,8 +27,6 @@
*/
/**
-
- * $Id$
* Copyright (C) 2001 NaN Technologies B.V.
* Guarded memory (de)allocation
*
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index b7f10ff92e1..fca87af5dc3 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -682,17 +682,35 @@ static const char *check_memlist(MemHead *memh)
uintptr_t MEM_get_memory_in_use(void)
{
- return mem_in_use;
+ uintptr_t _mem_in_use;
+
+ mem_lock_thread();
+ _mem_in_use= mem_in_use;
+ mem_unlock_thread();
+
+ return _mem_in_use;
}
uintptr_t MEM_get_mapped_memory_in_use(void)
{
- return mmap_in_use;
+ uintptr_t _mmap_in_use;
+
+ mem_lock_thread();
+ _mmap_in_use= mmap_in_use;
+ mem_unlock_thread();
+
+ return _mmap_in_use;
}
int MEM_get_memory_blocks_in_use(void)
{
- return totblock;
+ int _totblock;
+
+ mem_lock_thread();
+ _totblock= totblock;
+ mem_unlock_thread();
+
+ return _totblock;
}
/* eof */