summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2006-07-30 20:06:10 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:38 +0200
commite615233a7c73892a1745e4fb3b3ff1a65d57cba4 (patch)
tree79e154d4807a7a64838079bd15f6813c3c9f3924 /malloc.c
parenta93e1a3559a0943223368e8dad15b9f5712a4937 (diff)
2006-07-30 Hans Boehm <Hans.Boehm@hp.com>
* malloc.c (GC_free): Remove redundant tests for THREADS.
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/malloc.c b/malloc.c
index caeb742..15e2dcf 100644
--- a/malloc.c
+++ b/malloc.c
@@ -423,9 +423,7 @@ void GC_free(void * p)
knd = hhdr -> hb_obj_kind;
ok = &GC_obj_kinds[knd];
if (EXPECT((ngranules <= MAXOBJGRANULES), 1)) {
-# ifdef THREADS
- LOCK();
-# endif
+ LOCK();
GC_bytes_freed += sz;
if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;
/* Its unnecessary to clear the mark bit. If the */
@@ -437,9 +435,7 @@ void GC_free(void * p)
flh = &(ok -> ok_freelist[ngranules]);
obj_link(p) = *flh;
*flh = (ptr_t)p;
-# ifdef THREADS
- UNLOCK();
-# endif
+ UNLOCK();
} else {
LOCK();
GC_bytes_freed += sz;