Microsoft KB Archive/34410

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Far Pointer Comparisons Do Not Account for Aliases


6.00 6.00a 6.00ax 7.00 | 6.00 6.00a | 1.00 1.50 MS-DOS | OS/2 | WINDOWS kbtool ---------------------------------------------------------------------- The information in this article applies to: - The Microsoft C/C++ Compiler (CL.EXE), included with: - Microsoft C for MS-DOS, versions 6.0, 6.0a, and 6.0ax - Microsoft C for OS/2, versions 6.0 and 6.0a - Microsoft C/C++ for MS-DOS, version 7.0 - Microsoft Visual C++ for Windows, versions 1.0 and 1.5 ---------------------------------------------------------------------- When code generated by one of the compilers listed above compares two far pointers for equality, it does not account for the possibility that the pointers have different segment and offset values yet point to the same location in memory. This is the correct behavior for the compiler; only huge pointers are normalized. The compiler assumes that near and far pointers that point to the same segment have the same segment value; any differences between the pointers must be in the offset value. Normalizing pointers would involve a very large performance penalty for applications running in the MS-DOS operating system and is not possible in the protected-mode addressing scheme of the OS/2 operating system. Additional reference words: kbinf 1.00 1.50 6.00 6.00a 6.00ax 7.00 8.00 8.00c KBCategory: kbtool KBSubcategory: CLIss

Keywords : kb16bitonly
Issue type :
Technology : kbVCsearch kbAudDeveloper kbCVCComp

Last Reviewed: May 5, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.