https://bugs.winehq.org/show_bug.cgi?id=54979
--- Comment #12 from John Nagle nagle@animats.com --- There is an outer level of spinlock.
See summary here: https://forum.winehq.org/viewtopic.php?t=37688
As far as I can tell, this is not fine-grained locking. It's just one big lock for the whole heap. That should be a short spinlock, which, if it times out, causes a kernel-level lock and block.
The bottleneck is that when you realloc a buffer, the old one may have to be recopied, and the heap is locked up during that period.