diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-02-26 23:27:21 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-02-26 23:42:57 +0300 |
commit | 16c55506c5222ef40eba1e4aedf200358421080d (patch) | |
tree | 5b7fc23b26192fde86c9a17b35ef2b68271326f3 /alloc.c | |
parent | 272283d5b0ebf35326187c12973ee540c19eae67 (diff) |
Revert 'Workaround TSan false positives in extend_size_map'
This reverts commit e522d6d791680b55825b5f11a4c082eb4770ecf5.
Because there is again a data race here, not a false positive,
though it is again not likely to fail in practice.
Diffstat (limited to 'alloc.c')
-rw-r--r-- | alloc.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -32,13 +32,12 @@ * The call GC_allocobj(i,k) ensures that the freelist for * kind k objects of size i points to a non-empty * free list. It returns a pointer to the first entry on the free list. - * If not using thread-local allocation, GC_allocobj may be called to - * allocate an object of small size lb (and NORMAL kind) as follows + * In a single-threaded world, GC_allocobj may be called to allocate + * an object of small size lb (and NORMAL kind) as follows * (GC_generic_malloc_inner is a wrapper over GC_allocobj which also * fills in GC_size_map if needed): * * lg = GC_size_map[lb]; - * LOCK(); * op = GC_objfreelist[lg]; * if (NULL == op) { * op = GC_generic_malloc_inner(lb, NORMAL); @@ -46,7 +45,6 @@ * GC_objfreelist[lg] = obj_link(op); * GC_bytes_allocd += GRANULES_TO_BYTES((word)lg); * } - * UNLOCK(); * * Note that this is very fast if the free list is non-empty; it should * only involve the execution of 4 or 5 simple instructions. |