summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/src/mt_allocator.cc6
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 997e319c886..a1feede7fc4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-04 Paolo Carlini <pcarlini@suse.de>
+
+ * src/mt_allocator.cc (__pool<true>::_M_reclaim_block): Do
+ not name a variable __used, badname on BSD.
+
2006-09-02 Paolo Carlini <pcarlini@suse.de>
Richard Guenther <rguenther@suse.de>
diff --git a/libstdc++-v3/src/mt_allocator.cc b/libstdc++-v3/src/mt_allocator.cc
index f0b98bdd019..6b5403dc652 100644
--- a/libstdc++-v3/src/mt_allocator.cc
+++ b/libstdc++-v3/src/mt_allocator.cc
@@ -275,7 +275,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Atomic_word* const __reclaimed_base =
reinterpret_cast<_Atomic_word*>(__bin._M_used + __max_threads);
const _Atomic_word __reclaimed = __reclaimed_base[__thread_id];
- const size_t __used = __bin._M_used[__thread_id] - __reclaimed;
+ const size_t __net_used = __bin._M_used[__thread_id] - __reclaimed;
// NB: For performance sake we don't resync every time, in order
// to spare atomic ops. Note that if __reclaimed increased by,
@@ -289,8 +289,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__atomic_add(&__reclaimed_base[__thread_id], -__reclaimed);
}
- if (__remove >= __used)
- __remove -= __used;
+ if (__remove >= __net_used)
+ __remove -= __net_used;
else
__remove = 0;
if (__remove > __limit && __remove > __bin._M_free[__thread_id])