Fix data race when getting object size in explicitly-typed allocators
authorIvan Maidanski <ivmai@mail.ru>
Fri, 10 Nov 2017 17:07:16 +0000 (20:07 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 10 Nov 2017 17:07:16 +0000 (20:07 +0300)
commit59372942a7cbb3e5ffe233823906ef8611fce716
treeb78cb7adb75f53ebc31588e4d00d00ebbe6102b8
parent47b1deafdcf870bf5831a415cf8909589affd35f
Fix data race when getting object size in explicitly-typed allocators

* typd_mlc.c (COMPLEX): Reformat comment.
* typd_mlc.c (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page, GC_calloc_explicitly_typed):
Always use BYTES_TO_GRANULES(GC_size(op)) instead of GC_size_map[lb] to
determine size of the allocated object in granules (because the value
of GC_size_map[lb] might be updated by another thread since the value
use in GC_malloc_kind); add comment.
typd_mlc.c