Under certain circumstances, using the Realloc function in a small memory block (if the total small-block memory pool exceeds 16 MB) causes access violation with the Visual C++ 6.0 small-block allocator.
In the following code block in the Realloc.c file:
// if the new size is not over __sbh_threshold, attempt
// to reallocate within the small-block heap
if (newsize <= __sbh_threshold)
{
if (__sbh_resize_block(pHeader, pBlock, newsize))
pvReturn = pBlock;
else if ((pvReturn = __sbh_alloc_block(newsize)) != NULL)
{
oldsize = ((PENTRY)((char *)pBlock -
sizeof(int)))->sizeFront - 1;
memcpy(pvReturn, pBlock, __min(oldsize, newsize));
__sbh_free_block(pHeader, pBlock);
}
}
And rebuild CRT.
NOTE: If you are rebuilding the DLL version of CRT, then the new DLL name should not start with "msvc".
Implement your own Realloc() function to avoid using the CRT implementation.
Use the _set_sbh_threshold(0) function to avoid the use of the small block heap. Both Windows NT 4.0 SP4 and Windows 2000 have an efficient OS-level heap implementation. You may encounter performance problems on Windows 95 and Windows 98 because its operating system heap implementation is not as efficient as the one on Windows NT.
A supported fix for the Visual C++ 6.0 static libraries that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem.
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:
The English version of this fix should have the following file attributes or later:
Collapse this tableExpand this table
Name
Size
Date
Time
Version
Platform
Libc.lib
843,586
12/20/1999
6:41 PM
none
x86
Libcd.lib
2,538,44
12/20/1999
6:52 PM
none
x86
Libcd.pdb
94,208
12/20/1999
6:52 PM
none
x86
Libci.lib
165,800
12/20/1999
6:41 PM
none
x86
Libcid.lib
397,510
12/20/1999
6:53 PM
none
x86
Libcid.pdb
77,824
12/20/1999
6:53 PM
none
x86
Libcimt.lib
178,144
12/20/1999
6:45 PM
none
x86
Libcimtd.lib
604,376
12/20/1999
6:56 PM
none
x86
Libcimtd.pdb
86,016
12/20/1999
6:56 PM
none
x86
Libcmt.lib
893,390
12/20/1999
6:44 PM
none
x86
Libcmtd.lib
3,151,58
12/20/1999
6:56 PM
none
x86
Libcmtd.pdb
94,208
12/20/1999
6:56 PM
none
x86
Libcp.lib
721,584
12/20/1999
6:41 PM
none
x86
Libcpd.lib
1,639,90
12/20/1999
6:53 PM
none
x86
Libcpd.pdb
167,936
12/20/1999
6:53 PM
none
x86
Libcpmt.lib
735,302
12/20/1999
6:44 PM
none
x86
Libcpmtd.lib
1,647,60
12/20/1999
6:56 PM
none
x86
Libcpmtd.pdb
167,936
12/20/1999
6:56 PM
none
x86
in the following self-extracting file:
Collapse this tableExpand this table
Name
Size
Date
Time
Platform
VC225099.EXE
3,345,777
1/17/2000
1:30 PM
x86
NOTE: If this product was already installed on your computer when you purchased it from the Original Equipment Manufacturer (OEM) and you need this fix, please call the Pay Per Incident number listed on the above Web site. If you contact Microsoft to obtain this fix, a fee may be charged. This fee is refundable if it is determined that you only require the fix you requested. However, this fee is non-refundable if you request additional technical support, if your no-charge technical support period has expired, or if you are not eligible for standard no-charge technical support.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the next service pack for Visual Studio 6.0.
For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
194022
(http://support.microsoft.com/kb/194022/EN-US/
)
INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295
(http://support.microsoft.com/kb/194295/EN-US/
)
HOWTO: Tell That a Visual Studio Service Pack Is Installed
To download the latest Visual Studio service pack, visit the following Microsoft Web site:
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.