From: Yuxuan Shui yshui@codeweavers.com
Before this commit, this->allocator appears to be given number of bytes as allocation size in msvcp90/details.c. But in msvcp120/tests/msvcp120.c, the provided allocator concurrent_vector_int_alloc, this size is multiplied by sizeof(int) again.
A small change to log the size from concurrent_vector_int_alloc shows our size is exactly 4x native. I think that's enough evidence that the size here is meant to be No. elements. --- dlls/msvcp90/details.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp90/details.c b/dlls/msvcp90/details.c index ffac610400f..d51a4c716f1 100644 --- a/dlls/msvcp90/details.c +++ b/dlls/msvcp90/details.c @@ -497,12 +497,12 @@ static void concurrent_vector_alloc_segment(_Concurrent_vector_base_v4 *this, __TRY { if(seg == 0) - this->segment[seg] = this->allocator(this, element_size * (1 << this->first_block)); + this->segment[seg] = this->allocator(this, 1 << this->first_block); else if(seg < this->first_block) this->segment[seg] = (BYTE**)this->segment[0] + element_size * (1 << seg); else - this->segment[seg] = this->allocator(this, element_size * (1 << seg)); + this->segment[seg] = this->allocator(this, 1 << seg); } __EXCEPT_ALL {